The Finch is a robot designed specifically for students learning computer science. You can write programs to move and turn the Finch, light up its beak, and collect information with its sensors. As you write programs, you will be able to test your programs with the Finch in the real world!
Lesson 1 – Moving and Turning
Creating a new program, declaring an object, using object methods
Importing the Finch Library and Declaring a Finch
Moving Forward and Backward
All of these parts are shown together in the sample program below. This sample program will move the Finch forward 10 cm at 50% of maximum speed. You can use the // sign or /* and */ to add comments to your program. Comments do not affect how your program works, but they make it easier for other people to use your code (and for you to remember what it does). The disconnect() method closes the program’s connection to the Finch. You should get in the habit of calling this method at the end of every program.
Try out the sample code shown above. Try out other values for the distance and speed parameters.
Write a program that makes the Finch move forward, then backward, then forward, and then backward again. The robot should end 15 cm behind where it started.
Turning the Finch
Write a program that makes the robot turn left in a full circle and then right in a full circle. The two turns should be at different speeds.
Write a program that makes the Finch move in a square and return to where it started.
Draw a simple picture with the Finch. You can place a marker through the hole in the Finch to draw your picture on a large sheet of paper. We highly recommend using a brush tip marker with the Finch. These markers work well. If you use a marker with a harder tip, the friction of the marker may make your drawing less accurate.