4

Is there any way for me to upload code to NodeMCU without using micro USB? I tried to connect RX TX (NodeMcu) along with TX RX (Arduino) but it failed.

5

Here is everything you need to know: ESP8266 Boot Mode Selection.

The following ESP8266 pins must be pulled high/low for either normal or serial bootloader operation. Most development boards or modules make these connections already, internally:

GPIO | Must Be Pulled
-----+---------------------------------------
15   | Low/GND (directly, or with a resistor)
-----+---------------------------------------
2    | High/VCC (always use a resistor)

On a NodeMCU board these pins are pulled to the correct voltages, you do not have to bother with them.

The ESP8266 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash.

GPIO0 Input | Mode
------------+----------------------------------------
Low/GND     | ROM serial bootloader for esptool.py
------------+----------------------------------------
High/VCC    | Normal execution mode

On a NodeMCU this pin is pulled to high by default and controlled by the automatic bootloader circuit if flashing is needed. The TTL - USB converter chip controls the RESET and GPIO0 with its RTS and DTR pins and makes sure that the ESP8266 enters bootmode before program download starts.

enter image description here

As you are bypassing this chip the ESP8266 probably does not enter boot mode any you cannot program it.

What you should do is connect the GPIO0 to GND, then reset the ESP8266 and after that the ESP8266 should be in bootloader mode and ready to be programmed using its RX and TX pins directly.

Mind that GPIO0 should be tied to GND only for the duration of the reset.

1

You can use Over The Air updates (OTA). If you google esp8266 OTA you'll find several examples such as this one

  • There is a catch to this. You can only use OTA if the "sketch" that is running has OTA support. So, for "first time" flashing, this does not help at all – Jaromanda X Mar 4 '18 at 0:07

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.