09 Mission Instructions

8. Sending the Message

Now it's time to decide how you want your robot to send the message it recorded. We are using the built-in eyes for our example, but you might use an LED or buzzer instead!

Since GoPiGo is produced by a company called Modular Robotics, whose team color is blue, we set our eyes to our favorite color: ModBot blue!


Then we create another state machine that's similar to the first one we made.


First, we'll create another variable, just like what we did for the list and set it to false. We named ours "LED_currently_on" so that we can keep track of whether we're telling the eyes to be turned on or turned off.

Then, we'll nest a conditional statement within the go over list command that we set up in the very beginning.

IF our variable is currently false (off), DO open both eyes, count for the current list item and then set the variable to true.

ELSE close both eyes, count for the current list item and then set the variable to false.

Optional: We chose to end our message with both eyes closed so it would be obvious when the message was completed, but you might choose something different! Maybe your lights change color? Or you launch a different actuator entirely, like a buzzer noise? It's completely up to you!