0

I don't have my USB type A cable to program my UNO, I would like to program it via a NodeMCU ESP8266.

Maybe with the TX and Rx pins, I've seen people program certain versions of ESP with a UNO board.

How do I do this and is it possible?

asked May 20, 2021 at 10:31
0

1 Answer 1

1

The UNO's USB connection is little more than a USB to UART converter. The NodeMCU's USB connection is also little more than a USB to UART converter.

With a little jiggery pokery (yes, that's a technical term) you can replace one with the other.

By keeping the NodeMCU in RESET mode (tie the EN pin low, or hold the RESET button) you can use the TX and RX pins as the output to the onboard USB to UART converter to connect to the TX and RX pins of the Arduino.

The tricky part is getting the Arduino to reset at the right time: you have to press the Arduino's RESET button at just the right time. Normally this is done by a small capacitor between the DTR signal of the USB to UART converter and the RESET pin, but you don't have access to the DTR signal, so you will have to do it manually. Timing here is everything. Press upload, and just as AVRDude starts to execute you press RESET. Having verbose compilation turned on in the IDE can help.

It may take a few attempts to get it right.

answered May 20, 2021 at 12:36
5
  • Just for clarification, as I'm a beginner... TX goes to RX and vise versa, right? Commented May 20, 2021 at 13:43
  • And should the target be UNO or NodeMCU? Commented May 20, 2021 at 13:45
  • 1
    No, TX goes to TX and RX to RX. You're mirroring the NodeMCU functions with the Arduino board. And the target is UNO, since that's what you're programming. The NodeMCU ceases to be an NodeMCU and is merely a USB to UART adaptor (like an FT232 cable). Commented May 20, 2021 at 14:00
  • 1
    I cannot believe my eyes, IT WORKED! Commented May 20, 2021 at 14:15
  • Congratulations. Commented May 20, 2021 at 14:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.