Step 4: Attach the Electronics.

Simple put if you would like to put a breadboard or circuit board on top to make this easier.

1. Attach both servo red wires (+) to (+) on arduino.
2. Attach both servo black wires (-) to GND on arduino.
3. Attach a wire you can solder on to the PING sensor, that is positive to positive on arduino.
4. Then the negative to the negative.
5. The signal wire on the ping goes to digital 7 on arduino.
6. The left servo white wire goes to 5 and right servo white wire goes to 6.

Then upload to arduino using the Arduino environment which you can find info on here this code.

Thanks you to the person who made his code here it is..


YOU will also need to get the servo library whoch can be found here...
arduino.cc also

Thanks you for viewing this instructable and i hope some of you get to make this cool robot..
This is a great Instructable, but you need to add a main image of the final project to the intro step. Please do that and leave me a message when you have so that we can publish your work. Thanks!
hey, the link to the code doesn't work anymore. could you post it here?
Could someone please post the code. The link provided does not work. <br>good simple project if I had the code
Or you could buy continuous rotation servos at radio shack for $12 apiece. These puppies have an H-Bridge inside them so that you don't need a motor shield.
Hello<br>Post the code pls!!! The link doesn't works.<br>Thanks
Would this be a good science project for a 7th grader??
hey the code on the site is also with other components so can you post yours
Can you plz show the wiring of your robot . I havea competition in two days. can you wire dc motors and write the same programe and logic for that,?<br>
I am still having problems with the code. I changed everything I could and uploaded the libraries. If you could upload working code that would be greatly appreciated!
Replace #include with #include <Servo.h>
afw11, on the top of the code where it says #include put the full library "phrase" for the servo. That should fix your problem.
Wow these are easy questions any engineer should know. Red is positive. Black is negative. The only wires on the ping sensor besides signal are positive and negative. The battery goes to the arduino power input.
The left servo goes to digital pin 6, and the right servo goes to 5. It is in the code, i think..
dude i have a optical mouse which i no longer use . can i by any means use it to detect weather there is a obstacle in front .???
You can do this with an old ball mouse for sure.. It seems like I've seen someone hack an optical mouse to do this, but I can't dig it up.<br/><br/>That being said, here's the link to get you started using a ball mouse:<br/><a rel="nofollow" href="http://hackaday.com/2008/05/16/how-to-scavenge-a-mouse-for-parts/#more-1838">http://hackaday.com/2008/05/16/how-to-scavenge-a-mouse-for-parts/#more-1838</a><br/>
Hey, nice work... thanks for shout out too ;)
That picture got messed up <br/>R = reciever P = paper E = emiter<br/><br/>/// //////// ///<br/>R--P---E<br/>
YA theres prolly a ir receiver emitter where the scroll wheel is. Pull that out. When the infrared light reflects off a wall and goes to a receiver the arduino will know a wall is there. <br/><br/>Like this <sup></sup><sup></sup> ////// ******<br/> RE paper EM<br/> To arduino pins<br/>

About This Instructable




Bio: I'm 17. I enjoy making cool stuff, and promoting the "maker" community. Vote for my space balloon in the hurricane laser contest and hands ... More »
More by robotkid249:My Space Balloon: Project Stratohab Success!! High School Student's Budget Electricity Generating Kite! Wireless Power 
Add instructable to: