Error from ESP8266 in Serial Monitor: "ets Jan 8 2013,rst cause:2, boot mode:(3,6)"

i need help as i am a beginner in this
i do not even know how to use these forum pages as im also a beginner in this as well
even if i upload a simple blink code in the nodemcu esp8266 i keep getting this error repeatedly in the serial monitor
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
does anyone know how to solve it. if anyone does would love to get the help.

can you give a link to the the specific ESP8266 board you are using - or at least a photo?
not all boards have an onboard LED (you may have to connect one) or you may be attempting to blink the incorrect GPIO pin
also on many ESP8266 board the pin labling does not correspond to the GPIO number, e.g. D2 is GPIO4 - see esp8266-pinout-reference-gpios

post your code (using code tags - select < CODE/ > and paste the code or text where it says “type or paste code here”)

what board did you select - for ESP8266 modules I tend so select Tools>Board>ESP8266 Dev Module

try this code which allows you to select the pin to blink (defaults to LED on GPIO2 at startup)

// Blink a LED - enter pin number via serial monitor
//
// outputs 200mSec square wave to specified pin
//
// start blinking LED_BUILTIN then asks for pin number

int led=2;  //LED to blink

void setup() {
  Serial.begin(115200);
  Serial.println();
    Serial.print("Led to blink ");
    Serial.println(led);
  Serial.println("enter pin number to blink ? ");
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(led, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  if(Serial.available()){
    int i;
    pinMode(led, INPUT);
    if(i=Serial.parseInt()) led=i;;
    Serial.print("Led to blink ");
    Serial.println(led);
    pinMode(led, OUTPUT);
  }
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(200);                       // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(200);                       // wait for a second
}

when run on a ESP8266 NodeMCU module the above code displays on the Serial Monitor (note the seral baudrate is 115200)

Led to blink 2
enter pin number to blink ? 
Led to blink 13
Led to blink 13
Led to blink 16
Led to blink 16
Led to blink 17

LED connected to pin GPIO4 (labeled D2 on PCB)

onboard LED is on GPIO2

thanks for responding

i have the lolin nodemcu esp 8266 v3(i only know this much about the board)
i selected the nodemcu 1.0 12E
i have tried with and without led
i used the code from the examples i got this repeatedly


after i used your code and connected an external LED im getting this repeatedly


i got this at the end after pressing reset

my NodeMCU ESP8266 looks identical to that in the photo in post 3
Tried Tools>Board with board selected nodemcu 1.0 12E - all works OK

have you anything connected to the ESP8266 PCB?

have you tried pressing RST and FLASH as you load

try File>Preferences and click "Show verbose output compile upload"

when you compile and load it should display something like

esptool.py v3.0
Serial port COM10
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 60:01:94:1f:7b:ee
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 271008 bytes to 199224...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 271008 bytes (199224 compressed) at 0x00000000 in 17.5 seconds (effective 123.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

what does it display?

it looks like this

// Blink a LED - enter pin number via serial monitor
//
// outputs 200mSec square wave to specified pin
//
// start blinking LED_BUILTIN then asks for pin number

int led=2;  //LED to blink

void setup() {
  Serial.begin(115200);
  Serial.println();
    Serial.print("Led to blink ");
    Serial.println(led);
  Serial.println("enter pin number to blink ? ");
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(led, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  if(Serial.available()){
    int i;
    pinMode(led, INPUT);
    if(i=Serial.parseInt()) led=i;;
    Serial.print("Led to blink ");
    Serial.println(led);
    pinMode(led, OUTPUT);
  }
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(200);                       // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(200);                       // wait for a second
}

i ran your code
before it was showing me the error or whatever this is "ets Jan 8 2013,rst cause:2, boot mode:(3,6)" in the serial monitor now it shows nothing
if i click reset it also give me this in the serial monitor

the program load look OK

have you set the serial baudrate to 115200? e.g.

before your Seria.print() text these is usually some characters which are ESP8266 boot messages which you can generally ignore

yes the baud rate is set to115200

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