08 Mission Instructions

Your mission is to design a robot that can be the Traffic Light for a game of Red Light, Green Light. Then you can play alone or with your friends.  To be successful, your robot will need to:

      1. Randomly change between two different colored LEDs
      2. Sense motion during a "Red Light"
      3. Declare when the robot wins or loses

11. Iterate

Now you can tweak your game to be the perfect amount of fun for you. 

Having trouble starting the program but not having enough time to run across the room to actually play with your robot? Try creating a get_started function to give yourself some set-up time!  Here’s an example of a get_started function and where it might fit within the overall code. 


Want the game to be more difficult or a little easier? Change the motion_count for the motion port. 

Want the game to move more quickly? Shorten the longest time in the random integer blocks!

Want more time between Green Lights and Red Lights? Lengthen the longest possible time in the random integer blocks!

Try changing how your robot celebrates wins and acknowledges losses. More dancing? More lights? Do you need to add a Buzzer or some LED lights that you received in previous missions?

*If you do decide to add a Buzzer or some LED lights to your robot, you’ll need to move your Distance Sensor to the I²C port and then plug the Buzzer or LED into the AD1 or AD2 port. Remember that you’ll need to update your code to tell the robot what you changed!