Skip to Content

Upload fails: 6 checks before blaming the code

Short answer: when the upload fails with "not in sync" or "Failed to connect", the code is rarely the cause. Check the cable, the port, the USB driver, the boards, the ESP32 boot sequence and any program holding the port, in this order.

Download the checklist (PDF, 2 pages)

Descarga la lista de comprobación (PDF, 2 páginas)

These checks apply to Arduino PLCs (M-Duino, Ardbox) and ESP32 PLCs programmed over USB with the Arduino IDE.

Six checks, in this order

CheckWhat to doGood result
1. CableSome USB cables only charge. Use one you know carries data.A new port appears in Tools > Port when you plug in the PLC.
2. PortUnplug the PLC, see which port disappears, plug it back in and select that one.The selected port is the PLC.
3. DriverNo port at all? Install the USB driver your PLC needs. Its manual says which one.The port appears after the installation.
4. BoardsInstall the Industrial Shields boards in the Boards Manager (industrialshields-avr for Arduino PLCs, industrialshields-esp32 for ESP32 PLCs) and select your exact model in Tools > Board.Your model appears in the list and is selected.
5. ESP32 bootOn an ESP32 PLC, if the upload does not start, follow the boot sequence in its manual.The upload starts and finishes.
6. Port busyClose anything else using the port: another Serial Monitor, Node-RED, a terminal.The IDE can open the port.

Power

The USB connection is enough to upload the program. To use the inputs and outputs, power the PLC with 12-24 Vdc, as its datasheet states.

¿La carga a un PLC Arduino o ESP32 falla con not in sync o Failed to connect? Revisa el cable, el puerto, el driver, las boards, el arranque del ESP32 y el puerto ocupado.

Commenting is not enabled on this course.