I am a beginner with Arduino. I am trying to upload any basic script from my PC to an ESP01 through an Arduino UNO and Arduino IDE.

The code I am trying to upload is very basic:

void setup() {

 // initialize LED_BUILTIN as an output pin.

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off

I have followed various tutorials and have wired the ESP01 as follows

ESP01 Arduino
Vcc 3V3
EN 3V3
RX (voltage divider to pull down to 3V3) RX
RST 3V3 (switch off) / GND (switch on)

enter image description here

I press 'Upload' in Arduino IDE, then press the reset button once on the ESP-01. The RX LED on the Arduino flashes in sync with the blue LED on the ESP-01. Then an error comes up and the code is not uploaded. The error log reads:

    . Variables and constants in RAM (global, static), used 28104 / 80192 bytes (35%)
╠══ DATA     1496     initialized variables
╠══ RODATA   920      constants       
╚══ BSS      25688    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 59667 / 65536 bytes (91%)
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     26899    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 232148 / 1048576 bytes (22%)
╚══ IROM     232148   code in flash   
esptool.py v3.0
Serial port COM7

A fatal esptool.py error occurred: Invalid (unsupported) command 0x8
  • \$\begingroup\$ Why is there a resistor divider on RX? Isn't RX already at 3.3V? \$\endgroup\$
    – sai
    Mar 27, 2023 at 7:57
  • \$\begingroup\$ I read that RX outputs 5V and therefore it would be better to step it down, although ESP pins can tolerate 5V, based on further reading of this advice forum.arduino.cc/t/… In my set-up, I get the same results with and without the voltage divider actually. \$\endgroup\$
    – Barth
    Mar 27, 2023 at 13:36
  • \$\begingroup\$ Sounds strange to me that RX is 5V when supply voltage is 3.3V. Anyway, we could ignore it for now as you confirmed that without the resistor divider also, it does not work. \$\endgroup\$
    – sai
    Mar 27, 2023 at 14:17
  • 1
    \$\begingroup\$ For starters, you should connect TX to RX and RX to TX. Anything one device transmits (TX) should be received by the other device (RX). \$\endgroup\$
    – Paul
    Mar 28, 2023 at 14:13

1 Answer 1


I bought the ESP-01 programmer and followed this tutorial. The programmer is fairly cheap but you will have to solder a push button between the GPIO0 pin and GND. You press the switch when plugging the programmer into the PC, this allows it to enter programming mode. Then you just select the board and COM port and hit upload. Works like a charm.


Your Answer

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

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