0
\$\begingroup\$

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.
 pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
 digitalWrite(LED_BUILTIN, HIGH); // turn the LED on
 delay(1000);
 digitalWrite(LED_BUILTIN, LOW); // turn the LED off
 delay(1000);
}

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

ESP01 Arduino
Vcc 3V3
EN 3V3
GND GND
TX TX
RX (voltage divider to pull down to 3V3) RX
I00 GND
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%)
║ SEGMENT BYTES DESCRIPTION
╠══ DATA 1496 initialized variables
╠══ RODATA 920 constants 
╚══ BSS 25688 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 59667 / 65536 bytes (91%)
║ SEGMENT BYTES DESCRIPTION
╠══ 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%)
║ SEGMENT BYTES DESCRIPTION
╚══ IROM 232148 code in flash 
esptool.py v3.0
Serial port COM7
Connecting......
A fatal esptool.py error occurred: Invalid (unsupported) command 0x8
asked Mar 27, 2023 at 4:33
\$\endgroup\$
4
  • \$\begingroup\$ Why is there a resistor divider on RX? Isn't RX already at 3.3V? \$\endgroup\$ Commented 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\$ Commented 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\$ Commented 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\$ Commented Mar 28, 2023 at 14:13

1 Answer 1

1
\$\begingroup\$

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.

MiNiMe
1,6517 silver badges19 bronze badges
answered Nov 15, 2023 at 11:43
\$\endgroup\$

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.