Code won't run without connection to computer

I am programming a robot with 4 servos and our program won't run without being plugged into the computer It works when it is plugged into both the computer and the 6V battery but when I unplug the computer the robot stops. I worked fined with a 12V but that fries the motors. I tried using a 10k resistor from tx to rx (like a website suggested) and using elegoo instead of arduino but it still doesn't run. Can anyone help; i'm pretty new to arduino? Thank you.

It's probably to do with the battery, or your wiring! or what shield you are using.

I'll guess the 6V battery is connected to the barrel connector or Vin which need at least 7V to work reliably.

Otherwise provide more information, like details of all components and a schematic/wiring diagram.

Steve

It could be either. Post your code and include a schematic, not a frizzy thing. A short description of what is expected would also help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.