I'm managing to upload a sketch to the ESP8266 01. I have been researching on internet but I'm not able to get it.
I have installed the libraries for Arduino IDE and my circuit is the ESP powered by 9V converted to 3.3V using a LD 3.3 converter. I tested the voltages and works fine. Also the led in ESP is on (red). To connect to the computer I'm using a TTL USB cable without vcc connected only for tx and rx.
The commands for the ESP works fine (AT commands), but when I try to upload a sketch it shown the following error:
espcomm_open failed
I also have connected to GP0 (ESP) a button to ground. The circuit is:
9V battery --> 3.3V converter --> ESP---> TTL
Anyone knows about that error and why could be? Because the AT commands works fine. Maybe I need to provide more information but not sure.
My goal is to do this tutorial: https://learn.adafruit.com/downloads/pdf/esp8266-temperature-slash-humidity-webserver.pdf
Another problem that I have following that tutorial is that in Arduino IDE, I cannot setup esptool as programmer, because isn't there. I loaded the same library for esp
-
If when I tried to do the commands and now doesn't work, means that I have to reflash the AT firmware again?CapAm– CapAm2015年11月11日 15:17:10 +00:00Commented Nov 11, 2015 at 15:17
-
Are you using the original AT firmware?Ikbel– Ikbel2015年11月13日 18:01:34 +00:00Commented Nov 13, 2015 at 18:01
-
Are you releasing GP0 from ground once the ESP has turned on?user1637451– user16374512015年12月26日 00:56:31 +00:00Commented Dec 26, 2015 at 0:56
1 Answer 1
Following on from user1637451 the following sequence has always worked for me:
- Before download, pull both GPIO0 and RST to ground.
- Release the pull down on RST, but keep GPIO0 low.
- When the IDE has finished downloading, release GPIO0 from low.
I usually have pull-up resistors (10K) on both RST and GPIO0.
As to the IDE problem. I used the tutorial from Sparkfun entitled "ESP8266 Thing Hookup Guide" and then the section "Installing the ESP8266 Arduino Addon". Because I used a different ESP8266 board to them I set the IDE to use the "generic ESP8266 board". This worked for me.