1 - Bumper

Very simple robot. Just drives forward until one of the microswitch closes. It will then reverse, then spin, then go forward again.

The robot is not very good when it runs straight into something as there is no bumper switch at the front. Trying adding one yourself and changing the code.

 

 

 

Connect the left drive servo to  D2

Connect the right drive servo to D3

These should be powered from the unregulated supply

 

Connect the left microswitch to C2, and the right one to C3.

These should be powered from the regulated 5V supply

 

The C++ source code can be downloaded here. You may need to change the makefile so that 'MCU_TARGET' is for your cpu, and 'F_CPU' is the speed of your cpu. You will also need to rebuild the C++ library by changing the makefile in the root folder of the library to have the same settings.