Help I had a code installed on my arduino so that It would spin a servo motor and also use the ultra sonic sensor. I used a code that was supposedly going to make my robot have obstacle avoidance but instead it just stoped working and unless I connected the usb 5 Volt to the arduino nothing would power on however before the battery pack worked just fine and turned it on.
And?
So I made this arduino car With a servo motor spinning a ultra sonic motor and 2 dc motors a arduino shield and a motor controller and the arduino itself and a battery pack on the back at first it was all working and all, I made a code to test all the components and they definitley worked and than I used another code which after I placed into the arduino made the battery pack not do anything and not power the thing however the 5v usb connector worked fine.I even programmed it back to the previous code which the car worked on but battery still didnt want to work Screenshot - a3bfc71eba370450c40f3adacc78c242 - Gyazo
Screenshot - 17bf89706b42de7fda55001499be05c2 - Gyazo
Screenshot - f5252a6bf287b0fb82bf82e2bbe17687 - Gyazo
The batteries were new
Looks like a low or dead battery. You wouldn't be trying to run all this on a small 9 Volt battery, are you?
Your side picture of your "car" does not show anything useful. A top and bottom view would be much more informative as well as your code, properly posted.
@mitch3650, please do not cross-post. Threads merged.
Just my opinion, for what it's worth, but I think you are underpowering your project with 4 AA batteries. I'm not sure which Arduino you are using but the Uno, for instance, really needs over 7 Volts on Vin for the onboard regulator to operate reliably. At 6 volts the regulator has a tough time putting out +5.
And please don't reply by altering your original post!