Writing a program is a Snap! Part II
Now lets add a robot to the program. The Finch Robot, an inexpensive and easy to program for robot with lights, sounds, light and obstacle sensors and movement!
Plug in the Finch to your computer’s USB port.
Start the BirdBrain server.
Click on Open Snap! choosing Level 4 first.
A browser window will open with snap and the Finch blocks preloaded, and a basic finch script.
Now lets turn the script into a descriptive paragraph.
When the “space: key is pressed, start a loop until the “x” key is pressed.
In the loop we will check the Finch Left Obstacle sensor and if the check returns a true, turn on the LED’s Red @ 0% Green @ 100% Blue @ 100%. If not then go to the next step.
Then check the Finch Right Obstacle sensor and if the sensor returns a true, turn on the LED’s Red @ 0% Green @ 0% Blue @ 0%. (This is how you turn the LED’s off.) If not then go to the next step. (which is starting the loop over until the “x” key is pressed)
Now you try. Change the keys pressed to start and stop and the LED values.