Your mBot also has LEDs (Light Emitting Diodes), and you can set them to different colours.
Program your mBot so that pushing the R key changes all of the lights to red, pushing the G key changes all of the lights to green, and pushing the B key changes all of the lights to blue. Also, make all the lights go off whenever the O key is pressed.
You will need to use the block below to accomplish this:
Program your mBot so that pushing the R key changes all of the lights to red, pushing the G key changes all of the lights to green, and pushing the B key changes all of the lights to blue. Also, make all the lights go off whenever the O key is pressed.
You will need to use the block below to accomplish this:
Extra Challenge (if you're up for it):
See if you can get your mBot to do an impression of a traffic light. When the 'T' key is pressed, the mBot's lights should turn green for 6 seconds, then amber for 3 seconds, and then red for 6 seconds. This pattern should then repeat over and over. You can use the values below to get the amber colour.
See if you can get your mBot to do an impression of a traffic light. When the 'T' key is pressed, the mBot's lights should turn green for 6 seconds, then amber for 3 seconds, and then red for 6 seconds. This pattern should then repeat over and over. You can use the values below to get the amber colour.