Lab4R_2013:
Upload Arduino code to a robot rover that will allow the rover to navigate around a "defense" tub and knock over a goal block under a lamp.

A-path Lab

You will be shown a robot rover running Arduino code Lab4pre13_noint.ino that allows it to test the wall-detecting lever switches and prints out on its serial monitor the photox values from the phototransistors on its forward stalks. The rover power supply batteries will be charged up to allow about half an hour of testing before running down.

You will want to rename Lab4pre13_noint.ino and place the renamed code in your IP folder, then commence modifying the code to allow the rover to react to walls and the distant light...

For the Lab4R test we will place a weighted tub about some distance beyond a goal block of wood about 2" x 6"x 8" in size; the goal block will be underneath an incandescent light bulb. Your programmed rover must start from a chalked-in square on the side of the weighted tub away from the goal. Once you flip on the "V-switch" on the back of your rover it will start and run autonomously, perhaps "bouncing" off walls or being "attracted" to the light bulb. If your rover knocks over the block within 45 seconds of starting you are a winner and can have Lab4R signed off.

By "knocks over" we mean the wooden block rotates in the roll or pitch axis 90 deg and falls flat on the field. The rover can't just bump or push the block, or allow the block to come to rest against a wall.

You are allowed to push the weighted tub with your rover, but you can't score by knocking over the goal with tub.

The referee will set the tub and goal and light in place, and chalk in the area your rover can start from, and (s)he will keep time for your trial.

Your team can have two trials per day.

Your FTQ will be to explain how you modified the default code to improve the rover's performance.

Notes:

You will likely have completed Lab4Lam and will use some of that code in your expansion of the renamed default code...

If the V-switch is accidentally switched off by contact with a wall or the defense box, your trial is over.

You may need to press the reset button on the Arduino card, or toggle the V-switch, to restart the rover.

The tone library helps send out clock signals to the stepping motors on the rover to control their speed. To increase speed, increase the tone clock rate.