10 Mission Instructions

5. Code: Control the GoPiGo with a Remote

This mission has two goals: 

  1. To be able to control the GoPiGo with the remote controller, 
  2. To enable the GoPiGo to avoid obstacles on its own. 

We’re going to tackle each goal separately, then merge them together. Computer scientists call this approach a top-down design. It’s a helpful way to approach difficult programming. 



The first part of the project is to program the remote controller behavior so that it can move the GoPiGo forward and backward, left and right, based on the behavior you decided upon in the design section. Here are the inputs the IR sensor can take. 


Now, you have to decide what kind of loop fits your project. Will the program run without interruption or is there a case where you want to stop it? Under what conditions? The sample program uses a repeat forever loop. 


I will be using a: 

- Forever loop 

- Repeat until __________ loop 

- Repeat ___________ times loop 


Once your remote controller is working as intended (forward and back, left and right), you’ve achieved the first goal and it’s time to turn your attention to the second goal! Note that the sample program is only programmed for forward, backward, and stop.