i cant upload anything to the esp8266. does not respond

i recently got the esp8266 01s wifi module listed here WiFi Module - ESP8266 (4MB Flash) - WRL-17146 - SparkFun Electronics
and i wanted to test it out, so i tried to upload the blink example program and im getting a unique problem (didnt find anything like it online).

here is my arduino nano to esp8266 connection

Arduino nano esp8266
3.3V VCC
GND GND
RX0 RX
TX1 TX
GND IO0 / GPIO0
3.3V EN

and i put a wire to connect arduino nano GND to RST

and i downloaded the esp8266 board and picked the generic esp8266 board
and from there i uploaded this modified blink program

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(2, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

i always get this error "esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
"

i do not know why even though Arduino ide says this
but it then stops working altogether
esptool.py v2.8
Serial port COM10
Connecting......................................____

RX0 RX
TX1 TX

cross your cables

Rx receives from Tx
Tx sends to Rx

and of course this can't be connected while you try to upload code

EDIT: second thoughts on what your question is.

are you trying to program the ESP-01 with the Arduino IDE or are you trying to use the ESP-01 in AT command mode with your Arduino ?

does it really matter ? in this case i want to upload a program to the esp8266-01s.

yes it does matter, you would not want the ESP to be connected to Rx/Tx whilst uploading the code and you would need to cross the cables.

so you are trying to use the Nano as a Serial adapter.

Are you 100% sure your ESP-01 pins (Rx especially) are 5V tolerant? I think they are only OK with 3.3V

Assuming it's OK to send 5V to the ESP Rx for your module, I would try to hold reset LOW (wire reset to GND) on the Nano so that the Nano's bootloader does not come make a mess during the transmission.

if 5v is not OK, you can do a small voltage divider with 2 resistors (1KΩ and 2.2KΩ should do) to lower the voltage on Rx near 3.3V

Once code is uploaded you remove GPIO0 from GND and reboot the ESP.

I've flashed dozens of ESP-01's using this.
I can' imagine the kludge of using an Arduino to program the ESP.

SteveMann:
I've flashed dozens of ESP-01's using this.
I can' imagine the kludge of using an Arduino to program the ESP.

i reached the point where i can upload programs, but nothing happens

Hi Nomad,

i reached the point where i can upload programs, but nothing happens

Says Yes and no at the same time without specifying what is happening in detail.
So what does happen in detail?

If you connect your ESP01 through a USB-to-serial-adapter and you click upload what do you see for messages in the Arduino-IDE?
If I remember right the ESP01 needs some pins connected to ground to enter flashing mode did you do all these steps?

If you can afford to buy a ESP8266 Wemos D1 mini or a ESP32-nodeMCU-board
Take such a device. Plug gin in USB-cable and upload works
best regards Stefan
best regards Stefan

Many times the ESP-1 doesn't get connected properly. ON the ESP-01 make sure that
VCC - > 3.3v
CH_PD -> 3.3v
RST -> 3.3v (this is omitted in many tutorials, but the ESP won't work if you don't pull it high)
GND -> GND
GPIO0 -> (GND for uploading) (3.3v or free-floating for normal operation)
GPIO2 -> 3.3v or free-floating
GPIO3 (RX) -> via voltage divider to either nano RX (for upload) or nano TX for communicating over the UART (not applicable in your case)
GPIO1(TX) -> 3.3v or free-floating or connected to either nano TX (for upload) or nano RX for communication over the UART.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.