To make the Finch relocate and also rotate, you have the right to usage the setWheelVelocities() approach. This method calls for 3 parameters. The first controls the speed of the Finch’s left wheel, the second controls the speed of the appropriate wheel, and also the third sets the time in millisecs that the Finch need to relocate.

You are watching: Forward and back and then forward and back

Exercise 1:

Create a brand-new file named “FinchForward.java” and also try out the command displayed above. It need to make the Finch move forward for 1 second.

Tip:

You might must lug the USB cord as the Finch moves. Otherwise, the cord may store the Finch from relocating and also turning easily.

Exercise 2:

Try transforming the time that the Finch should relocate. Can you make the Finch relocate forward for 5 seconds?

Exercise 3:

Both speed parameters have to be between -255 and also 255. To make the Finch relocate in a straight line, the speeds for the two wheels need to be the exact same. Try out the code shown below. How does the Finch move?

Exercise 4:

You can regime the Finch to make a sequence of movements. The commands below will certainly make the Finch move forward first at speed 75, then at speed 150, and also then at rate 225. Try out this sequence. Then modify it so that the Finch moves backward rather of forward.

Exercise 5:

Write a regimen that renders the Finch relocate forward, then backward, then forward, and also then backward again. The robot have to pause for half a 2nd in between each motion.

Exercise 6:

Write a program that moves the Finch at five different speeds. The Finch have to relocate for 4 secs full.

Exercise 7:

Write a program that asks the user for the Finch speed and then moves the Finch at that speed.

Exercise 8:

Write a program that asks the user exactly how many seconds the Finch need to relocate and also then moves the Finch forward for that variety of seconds. The Finch must additionally speak the number of secs that it is moving.

National Science Foundation Research and also advancement at BirdBrain Technologies has actually been generously funded in component by STTR grants from the National Science Foundation.

See more: Why Does My Bearded Dragon Close One Eye ? 8 Reasons Why Why Do Bearded Dragons Close Their Eyes