# Sketch uploads but the robot does nothing: a short checklist

> A checklist for a robot that uploads fine but does not move: power, grounds, pin numbers, driver enable pins and printing debug values.

Canonical: https://roboticsengineering.in/fix/arduino-sketch-uploads-but-robot-does-nothing/ | Published: 2026-11-03 | Updated: 2026-11-04

**If the upload succeeded, the board is fine. Check power, grounds, pin numbers and the driver inputs next.**

## What the message means

An upload only proves the board and cable work. Motion needs the supply, the wiring and the code to agree.

## Fix it in this order

1. Print a message in setup() and in loop() to confirm the code runs.
2. Check the battery voltage while the robot runs.
3. Join the grounds of the controller and the motor driver.
4. Check every pin number in the code against the wiring, including the enable pins.
5. Test each motor directly from the battery to confirm it works.
6. Run a simple test sketch that turns one motor for two seconds, and build up from there.

## Why it happens

If the upload works but the robot does not move, the code is running and the problem is usually power or wiring: no separate motor supply, a driver enable pin not set, a missing common ground, or a flat battery.

Add Serial.println() lines to show the program reaches the motor code, test the motor driver with a simple sketch, measure the battery under load, and check the enable and direction pins one at a time.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Messages print, motors do not move | Driver, supply or ground. |
| Nothing prints | Board or code is not running. |

## Related

[common ground](https://roboticsengineering.in/fix/two-power-supplies-need-common-ground-robot/), [L298N not spinning](https://roboticsengineering.in/fix/l298n-motor-not-spinning/), [TB6612FNG not spinning](https://roboticsengineering.in/fix/tb6612fng-motor-driver-not-spinning/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

## Why this happens

A successful upload only proves that the compiler produced a program and the bootloader wrote it to flash. It says nothing about whether the program runs as you expect, whether the motors have power, or whether the driver is wired to the pins you used in code. A robot that does nothing has several layers that can each fail silently: the processor, the logic wiring, the motor supply and the mechanical load.

Work from the inside out: first prove the board runs your code, then prove a pin changes, then prove the driver output has voltage, then prove the motor turns when connected straight to its supply. The first layer that fails is the cause.

## How to confirm the cause

- Blink the on-board LED and print a line from setup(). If neither happens, the board is not running your sketch (wrong board selected, reset loop or a brown-out).
- With the sketch driving a pin high, measure that pin with a multimeter against ground. About the logic voltage means the code and pin are fine.
- Measure the motor supply at the driver’s power terminals, with the motors trying to run. A voltage that collapses means a weak battery or a poor connection.
- Check that the grounds of the battery, the driver and the board are joined. Without a common ground the control signals mean nothing.
- Look at the driver’s enable pin or jumper. Many drivers do nothing until enable is high.

## Worked example

A bare test that runs a motor channel back and forth with a serial message. Pin numbers are examples; change them to your wiring.

```
const int IN1 = 5, IN2 = 6, EN = 9;

void setup() {
  Serial.begin(9600);
  pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(EN, OUTPUT);
  Serial.println("start");
}

void loop() {
  digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW);
  analogWrite(EN, 200); delay(2000);
  analogWrite(EN, 0);    delay(1000);
}
```

## Common mistakes

- Powering the motors from the USB port or a 9 V block battery that cannot give the current.
- Leaving out the common ground between the battery and the controller board.
- Using pins 0 and 1 for motors while also using Serial.
- Changing many things at once, so the real fault is never isolated.
- Trusting the code because it compiled, without a single printed line to show it runs.

## If this did not fix it

- The board resets whenever the motors start, because the supply sags; watch for repeated ‘start’ lines.
- The sketch waits in a loop for a sensor, a Bluetooth link or a serial character that never arrives.
- The driver overheats and shuts down after a short run.
- The pin numbers in code refer to a different numbering than the labels on your board.
