• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Watchdog timer reset question

Q&A Forum › Category: Other › Watchdog timer reset question
0 Vote Up Vote Down
Larry asked 3 years ago

So when I write a sketch to my ESP 8266 and open up the serial monitor I get the watchdog timer reset error:
ets Jan 8 2013 ,rst cause:4,boot mode:(3,6)
load 0X4010f000
tail 4
chksum 0xcc
load 0x3fff20b8, len 3460,room16
tail 4
chksum 0xc9
csum 0xc9
v00042260
~1d
If I run the same sketch on a Arduino Nano the sketch works in the serial monitor. Just to be clear here I was just too lazy to change boards and trying to brush up on coding , sort of testing myself writing several programs and getting them to work. Here is the sketch, basically it asks what color led do you want to light. INMHO you for the most part should be able to load basic sketches in either ESP8266 or Arduino short of WiFi communicating. Also if I run a basic WiFi sketch it loads and runs fine on the 8266 ie;WiFi Scan

Start your code here

[code]
int redLed = 4;
int yellowLed = 5;
int greenLed = 6;
String myColor;
String msg = “What color led do you want?”;
int dt = 100;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(redLed, OUTPUT);
pinMode(yellowLed, OUTPUT);
pinMode(greenLed, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(msg);
while (Serial.available() == 0); {
}
myColor = Serial.parseInt();
if (myColor == ” red “) {
digitalWrite(redLed, HIGH);
digitalWrite(yellowLed, LOW);
digitalWrite(greenLed, LOW);
delay(dt);
}
if (myColor == “green “) {
digitalWrite(redLed, LOW);
digitalWrite(yellowLed, LOW);
digitalWrite(greenLed, HIGH);
delay(dt);
}
if (myColor == ” yellow “) {
digitalWrite(redLed, LOW);
digitalWrite(yellowLed, HIGH);
digitalWrite(greenLed, LOW);
delay(dt);
}
}
[/code]
 

Question Tags: General programming
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
The problem is probably because there isn’t an available GPIO 6 on the ESP8266 board.
Change that pin, and it should be fine.
For more information, you can check the ESP8266 pinout guide: https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/
Regards,
Sara

0 Vote Up Vote Down
Larry answered 3 years ago

Wow, didn’t even notice that, thanks.Just  I was writing this code that I would just use them in order not really checking if they were even there, assumed it was valid.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

OK.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.