This project uses an Arduino to control a tank through a web page. The tank is driven from a control panel on a web page, that is communicated to over a WiFly. The tank uses a Parallax Ping to avoid obstacles, a servo for aiming the turret and a Tamiya tank platform for locomotion.
Why did I make this you ask? Because like everyone else I wanted to make a tank that fired lasers.
Step 1: Parts
-Tamiya Dual Motor Gearbox: http://www.sparkfun.com/products/319
-Tamiya Tank Treads: http://www.sparkfun.com/products/321
-Universal Mounting Platform: http://www.sparkfun.com/products/10016
-Arduino Motor Shield
-Sparkfun ProtoScrew Shield: http://www.sparkfun.com/products/9729
-Parallax Ping: www.parallax.com/tabid/768/ProductID/92/Default.aspx
-Mini Servo: http://www.hitecrcd.com/products/analog/micro-mini/hs-55.html
-Nuts, Bolts, Standoffs, Plexiglass
-Dynamite Prophet Sport II : http://www.dynamiterc.com/Products/Default.aspx?ProdID=DYN4063
-Dynamite 7.2v Battery: http://www.dynamiterc.com/Products/Default.aspx?ProdID=DYN1466
-WiFly RN-XV : http://www.sparkfun.com/products/10822
-XBee Breakout: http://www.sparkfun.com/products/8276
For the target you will need:
-TSL230R : http://www.sparkfun.com/products/8940
-Sparkfun TriColor LED :http://www.sparkfun.com/products/10111
Step 2: Tank: Build
I used nuts and bolts to create a platform above this for the Arduino, Servo and PING.
I copied the dimensions of the Universal Plate set for the plexi glass second platform.
The laser pointer can be attached to the servo horn.
But what was really tricky for me, the Arduino Motor Shield uses up a ton of pins, but you cannot see it quickly as it is wired internally. I found it helpful to just quick sketch it out.
Step 3: Power
Then used a plug to connect to the motorshield's screw terminal.
Step 4: Tank: Load Code
v.2 of the code updated on 3/29.
Step 5: Tank: Iterative Build - Object avoiding tank
Step 6: Tank: Iterative Build - Web Enabled Tank
At this point the control was just telnetting to port 2000 and sending a command.
Step 7: Tank: Iterative Build - Robot Tanks with Lasers
The laser pointer was attached to the servo horn and wired to the Arduino.
Step 8: Web Interface
The page opens a socket to the WiFly and sends the actions to it.
Step 9: Target
I'd like to improve on this by making the target larger and having it update the web page.
Step 11: Play the game
You can drive the tank. When you are ready to fire, you can aim the turret and fire.
You have 3 choices of firing, targetted shot, burst and spray.
The target shoot ones shot, the burst fires at a 30° arc and the spray fires 180°.