Caster Bot

See this post about the USB host shield and Bluetooth dongle.

Parts List:

1 x OSEPP Mega 2560 R3 Plus (A regular Arduino Mega 2560 or UNO will work fine)

1 x USB Host Shield (Or the Sparkfun version)

1 x USB Bluetooth dongle (See this post about which dongles work and which don’t)

1 x Serial Bluetooth transceiver module (Or a more expensive version from Sparkfun)

2 x Parallax Continuous Servos

1 x Small breadboard

1 x 102dB Piezo Siren

1 x 2S (two cell) Lithium Polymer battery

1 x Lithium Polymer battery low voltage alarm

1 x MB1010 LV-MaxSonar®-EZ1™

1 x Caster wheel

2 x Drive wheels (material of your choice. Pre-made wheels can be found online).

1 x High voltage LED of your choice

1 x Frame (can be made out of plastic, wood or metal. You choose).

Code:

Here is a link to the code I am running. Note that you will need to install the USB Host Shield library as explained in this post in order to compile this code. I am running this code on an Ardunio Mega 2560, so if you choose to use an Arduino UNO some modifications will have to be made. First, you will have to remove all instances of Serial1.print() or Serial1.println() as the UNO only has one Serial port (doing so will not effect the operation of the code in any way). Second, because the USB host shield library takes up so much memory, you may have issues, especially with older versions of the UNO. You may have to remove parts of the code to keep the size down. Finally, I use one of the pins on the Mega that does not exist on the UNO, so you will have to reassign that pin in Def.h (it is pin 23, which I am using to control the MOSFET that runs the high voltage LED).

Advertisements