Exercise 19 - WefaaRobotics/Smorphi GitHub Wiki

Items needed:

  • An assembled Smorphi 2 robot
  • Pixycam
  • A computer
  • A USB to USB-C cable
  • Internet connection
  • Coloured papers

Objectives of exercise:

  1. Detect colours with the Pixycam

Steps Description
1 [Blockly code]

For this exercise, you will need to code out Blockly code that will allow your Smorphi to detect colours. Based on previous exercises, you should be well versed with this so no sample code will be given.

2 [Setting up for colour detection]

You will use coloured papers to test your Smorphi's colour detecting capabilities. Train your pixycam to detect colours. If you have yet to do so, you can refer to Exercise 16.

3 [Activity]

Here is what you have to code out on Blockly. When Smorphi detects a colour of colour_signature = 1, it will shape transform to I shape. It will shape transform to T shape for colour_signature = 2 and O shape for colour_signature = 3.

3 [Solutions]

Once you are done, you can check the solutions here!

4 [Unleash your creativity]

Think of other ways you can integrate the pixycam to your robotics projects

⚠️ **GitHub.com Fallback** ⚠️