I am trying to make an obstacle avoiding robot car with 4 motors, 6-8 AA Batteries, a SG90 Servo, one HC-SR04 Ultrasonic sensor, and an L293d Motor Shield. The sensor works, the servo works, the wheels work, but when I plug them all together, the bot wont act like it does in the videos.
Everytime i try to upload the code, it tells me that some programmer isnt responding or some com something bullshit, and I am sick and tired of it.
The components worked indivdually. I gave power to the motors directly from the batteries and they wordked. I tested the servo and the sensor seperatly, and they worked.
When all these components are combined, the bot acts like it lags. It cant even detect when there's a wall right in front of it in order for it to go backwards.
If this is a kit, and each device worked independently, but when all devices are connected and using power, the issue is probably power.
I would proceed in two ways.
Start with one motor at a time and make them work, add a device and test until problems happen, change the order of adding devices to see if order matters (or if two devices interfere).
Leave motors to the end. Start with any device, test, add one device at a time, test, add another device, test, add one motor, test, add another motor...