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?
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It only takes a minute to sign up.Sign up to join this community
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.