Finch Robot Array Exercises:

1. First, get a little practice with straight arrays, no robot. Create an array of 10 integers. Ask the user to enter 10 numbers, putting each number into one box of the array. After the user is done entering numbers,  print all the numbers they entered. (Print the array.)

2. Copy your program above and change it to ask the user to enter L, R or F 10 times. Change your array to a character array so it can hold the L,R or F. When the user is done, tell the finch to execute  each instruction the user entered. If the user entered L, turn left . For R, turn Right and for F go forward. (Right is myFinch.setWheelVelocities(255,-255); ) After each instruction is executed, ask the finch to sleep for 1 second so it has time to move. Print "All done" to the screen when you are done.

3. Explore the light sensors. Make a new program that asks the user if they are read to record the light value. When the user enters y, get the value of the light sensors and print them both to the screen. Keep asking the user and recording the value until the user enters n. When you run your program, try covering each eye to see how much light a covered and uncovered eye has.

4. Make a game in which a random number tells the player to cover either the right or left eye. Get a number of 0 or 1. 0 will mean the left eye should be covered and 1 will mean the right eye should be covered. When the left eye should be covered, show red (myFinch.setLED(255,0,0 );) Otherwise, show green. The robot should wait until the eye is covered and then change the color to Blue. (Use a while loop that keeps checking for the expected light value. It will have to check being less than a value, not an exact value. Let the answer to #3 inform you of what values will work to indicate a covered eye.)  Enhance this game to repeat 10 times.