How Can We Help?

Make Codey Rocky Identify Colors

Make Codey Rocky Identify Colors

1) Drag an Event block when Codey starts up to the Scripts area.

image

2) Add a Control block if () then (), and a Sensing block the color detected is ()?.

image

image

3) Add a Lighting block RGB LED lights up () to make the LED lights up red when the color detected is red. Drag a play sound () block and change the sound to “score” to add some sound effects.

image

image

4) We want Codey Rocky to detect color blue. Right click to duplicate the blocks. Change the color to blue.

image

image

5) Add a Control block forever to create a loop.

image

6) Click “Upload” to upload the program to Codey.

image

7) Have a try!

Note: keep the IR sensor face-down.