Moving the Boat Down
Thinking and Planning and Moving the Boat
Last updated
Thinking and Planning and Moving the Boat
Last updated
Return to your hand written algorithm instructions and create a 5x5 grid. Then draw the movement of your boat from start to finish ensuring that every single LED is hit ONCE
TIP: Refer back to the Create an Algorithm Instructions
Our Boat will have two different basic movements: traveling UP and DOWN the GRID. We will create two different procedures, titled moveUP and moveDown that we can use over an over again in the program.
TIP: We never want to write the same code more than one time
Looking at your drawn grid and making sure your boat is in 0,0 write the steps to have your boat move to each LED directly below it until it reaches the bottom, and then moving to spot 1,4 to begin its moveUp (but not actually moveUp). At each LED, the light should pause for 1000ms so I can "see" the journey. You may NOT use the either of these two blocks
TIP: Which way is the boat facing? Consider rotating
Now program your boat to moveDown 1 column based on your notes. Before moving on make sure to print this page and add it to your folder