This program was originally designed to run on top of a table, whereby the robot's sensors would detect the edge, reverse, rotate in a random direction and then continue forward again. However, due to the placement of the sensors relative to the wheels, we could not always guarantee that the robot would always be able to avoid falling off the table. Without any modifications, the program still works when using a perimeter of electrical tape.

The speed of the robot can be adjusted up or down by using the A or C push buttons. The B button will make the selection and start the program.

Download Project Tabletop source code (which includes the fence program) here.