Blink (without support of Serial Monitor)


This will be the first example. Let’s start with an easy one.
Let’s blink a led.

This example explains blink by using a USB-TTL connector that support DTR and Reset (RST).Use this blink_manual_flash example.

Depreciated Arduino 1.6.5

By using DTR, explained on this page, uploading will go smoothly. Please be informed that Serial monitor will not work anymore.
If you have 2 NPN transistors available. I recommend to use this example: blink

Shopping list
– 1 ESP8266 (for example version ESP01)
– 1 led (I use a red one)
– 1 USB to TTL (I use FT232RL)
– 10 wires
– 1 breadboard
– a 3.3V power source (I use an battery in this example, power from your USB TTL will most likely might NOT work)

TTL to ESP01 blink ESP8266


[table caption=”Wires” width=”500″ colwidth=”20|100|50″ colalign=”left|left|left|left|left”]
+3.3V, CH_PD
battery -, GND
battery +, VCC
led-longleg, GPIO2
led-shortleg, GND


Actually this is the same example as you may find in Files->Examples->01 Basics-> Blink.
ledPin = 2 means that we are using GPIO2.

int ledPin = 2;
void setup() {
pinMode(ledPin, OUTPUT);

void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second


Press upload in the Arduino IDE, arduino will compile and upload. After the sketch is uploaded, the led will blink for one second on and off.

When you have uploaded the sketch, you may remove all the wires required for uploading.
This is what is left.

ESP8266 ESP01 blink

15 thoughts on “Blink (without support of Serial Monitor)

    1. i have done all connection but using arduino uno. But there is an error while loading program if i connect Rx to Tx and Tx to Rx.But if i have done vice versa ,program get uploaded but my led not blinked this time.What is the problem ?
      I have used github library for esp8266,but i am confused which library i select generic esp,nodemcu esp and many more?? i havve esp8266 which i bought for $3.
      If I am using serial monitor to send “AT ” directly to essp8266,it is not responding.What is the probblem????

  1. Hi, I love detailed examples like this, but i have the next problem when trying to upload:

    Sketch uses 174.214 bytes (33%) of program storage space. Maximum is 524.288 bytes.
    warning: espcomm_sync failed
    error: espcomm_open failed

    I press flash, press reset, release reset, release flash, upload and always the same error. Please help me!.

    1. Hi, I have the same problem like juanmol.

      Der Sketch verwendet 198.228 Bytes (37%) des Programmspeicherplatzes. Das Maximum sind 524.288 Bytes.
      warning: espcomm_sync failed
      error: espcomm_open failed

      I tried all orders of pushing the buttons but I still can’t upload the sketch.
      I connected the ESP8266 to my Arduino Mega ADK. (TX -TX via voltage divider and RX-RX)

      Does anybody know how I can solve this problem?
      I tried to select the “Generic ESP8266 Module” Board and “esptool” as programmer, and the “Mega ADK” Board and the standard programmer.
      Neither worked.

      My wiring:
      Arduino Mega ADK — ESP8266 ESP-01
      GND — GND
      TX (PWM Pin 1) — TX
      RX (PWM Pin 0) — RX
      GND —pushbutton –> RST
      +3.3V — VCC
      +3.3V — CH_PD
      GND — pushbutton –> GPIO0

      led,longleg — GPIO2
      led,shortleg — GND

      Any idea?
      Thanks in advance

      1. When flashing code with the Arduino IDE to the ESP8266 you’re actually compiling a complete firmware which is getting written to the ESP. This is why the ESP needs to be in FW flash mode, not in normal mode.

        You have to pull down GPIO0 (connect it to ground) as if you were to flash/update a firmware when flashing the code.

        To run the code GPIO0 has to be floating or up.

  2. Hi all,
    Has any had a solution to
    warning: espcomm_sync failed
    error: espcomm_open failed
    I use the two button method, to get the ESP into bootloader mode (Ie. GPIO1 glows).
    However….. no go!

    I read on some froums that in the Tools>Programmer thereshould be an esp option.
    That option does not appear in my installation.


  3. same problem, use esp-3 , arduino 1,6 with win 7.
    warning: espcomm_sync failed
    error: espcomm_open failed

    I use meter to measure 3.3 v cross ground and vcc. and ch-pd, all ok, but still fail to upload


  4. Your shortcodes aren’t working for tables and code, can you please fix it? It’s a bit annoying to have to create a CSV just to see the connections you are making.

  5. DTR from my FTDI232 is normally low. As this is connected to Reset, this means that the esp8266 is held in reset

    When I press the compile/download button in the IDE, the DTR signal goes high while it is attempting download, and then returns to low when it gives up.

    Same is true for RTS.

  6. I’ve figured out that it is simply having the serial monitor open that takes DTR and RTS to low.

    This is also true for the PUTTY terminal application, the Eclipse serial terminal and a terminal under cygwin.

Leave a Reply