The Beegide Finch is a species of bird native to the land of Nehvurtuebriet. The Beegide is very sensitive to light and doesn’t like it when people move it from its natural habitat. Unfortunately, they are temperamental and get angry very fast when lighting conditions are not just right. Your job is to write code for your Finch that will allow it to better communicate with you. You will need to get it to tell you if the light is too dark, too bright, or acceptable.
You have just earned a new job at the Finch Flying Test Center. Your task is to create a program that will test the Finch’s ability to complete multiple tasks and earn its “license to fly.”
The program should test the Finch’s capability to accelerate in x, y, and z directions - if all are greater than or equal to 1, then the Finch passes the test (the user must help the Finch with this task!). Also, the program should evaluate the Finch’s ability to detect obstacles in front of him/her.
Teach your Finch to sing by writing a class that converts notes to tones to play. The class should play a song represented by a string. The string should be composed of notes – acceptable characters are A, a, B, b, C, c, D, d, E, e, F, f, G, and g. You will need to use the Finch’s buzzer to generate the correct musical note for each letter. Be sure to implement appropriate error checking! How will you ensure that the user enters a valid song?
Create a program that listens for six characters: f, b, l, r, x, q. The program should exit when 'q' is pressed. For the other commands, the Finch should move as follows:
Create a simple version of Simon Says with the Finch! Generate a random number from 0-5, where a number corresponds to one of the six possible Finch orientations (Beak Up, Beak Down, Left Wing Fown, Right Wing Down, Level, and Upside Down). Have the Finch say the orientation corresponding to the number, and then give the user five seconds to put the Finch in that orientation. At the end of five seconds, check if the Finch is in the correct orientation, and then compliment the user (if correct) or insult them (if wrong).
Turn the Finch into a mountain climber by writing a program that make the Finch seek the highest grade and drive in that direction. Write a program that does the following:
- Checks the orientation of the Finch.
- Turns the Finch so that it can drive uphill.
- Makes the Finch drive uphill.
It is fine for the Finch to drive backward up the hill, if it determines that is easier!
Program your Finch to wander around a room. When it encounters an obstacle, it should back up and turn away from it randomly for two seconds – you can do this by generating two negative random values for the left and right wheel velocities. The Finch’s beak should glow green when it is moving around. The beak should change to red when the Finch sees an obstacle and is moving away from it. Since Finches are diminutive and polite creatures, it should also apologize (or beep apologetically) for nearly running into an obstacle when it sees one.