Uploading sketch to esp8266

I need to upload my sketch to esp8266 but i am not able to do it by connecting it to an adruino uno r3. I get an error like ‘fatal error: unable to connect…’.
Do I need a usb to ttl converter?

Normally (??) you select the ESP board you are using and select the Com Port in the Arduino IDE.

It looks like you’re trying to use an Arduino as the USB to TTL convertor. If you need to do that what reference did you follow?
Also, can you provide more information, like the actual ESP board you are using?
Dave

Instructions can be found here amongst other places.

1 Like

Sorry for the late reply to this post! I managed to get it working but required a lot of fiddling around. So, ESP8266 can be programmed via Arduino Uno using following instructions:

  1. Connect 3v3 and EN pin on ESP8266 to 3.3V pin on Arduino UNO R3 board
  2. Connect GND and GPI00 on ESP8266 to GND pin on Arduino UNO R3 board
  3. Connect RX pin on ESP8266 to RX pin on Arduino UNO R3 boarda
  4. Connect TX pin on ESP8266 to TX pin on Arduino UNO R3 board
  5. Power up Arduino Uno R3 board by connecting it to the USB port of the laptop
  6. Connect RESET pin on Arduino UNO R3 board to GND pin on the Arduino UNO R3 board

The thing to remember with the Arduino is that the serial port Rx pin is labelled <Tx0 i.e. input from transmit pin, and the Tx pin is labelled >Rx0 i.e. output to receive pin when connected to a remote device.

Makes sense when you consider the arrows basically swap the pins around.

Its pretty strange but when you are programming the esp8266 using arduino then RX needs to connect with RX and TX needs to connect with TX (along with other connections that I have mentioned above). Otherwise, RX connects to TX and TX connects to RX - as you correctly mentioned in the comment.