I can't figure out what's wrong about a simple LED sketch and errors being thrown
Posted: Wed Aug 29, 2018 11:55 pm
I have a VERY simple LED sketch I was working on because I'm having these weird issues occur. Here is the sketch.
I even commented out the digitalWrite part and just tried to print to serial monitor. This is what the monitor is doing the entire time:
Which translates to:
WHAT? What in the WORLD is going on? I'm in constant reboot anytime I try to setup an input on this thing. I'm using a NODE MCU ESP32S dev board. I'm using USB cable and power from my laptop. I'm positive I have the correct pins setup on my breadboard too. HELP?
Code: Select all
#define LED_BUILTIN 2
int button = 6; // push button is connected
int temp = 0; // temporary variable for reading the button pin status
void setup() {
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT); // declare LED as output
pinMode(button, INPUT); // declare push button as input
}
void loop() {
temp = digitalRead(button);
if (temp == HIGH) {
//digitalWrite(LED_BUILTIN, HIGH);
Serial.println("LED Turned ON");
delay(1000);
}
else {
//digitalWrite(LED_BUILTIN, LOW);
Serial.println("LED Turned OFF");
delay(1000);
}
}
Code: Select all
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Core 1 register dump:
PC : 0x400d09a0 PS : 0x00060330 A0 : 0x800e3e95 A1 : 0x3ffb1f80
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00060023 A5 : 0x3ffc72fc
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d09a0 A9 : 0x3ffb1f60
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0800001c A13 : 0x00000003
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x00000006 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400d09a0:0x3ffb1f80 0x400e3e92:0x3ffb1fa0
Code: Select all
PC: 0x400d09a0: loop() at C:\Users\Me\Documents\Arduino\ESP32_ButtonTest/ESP32_ButtonTest.ino line 14
EXCVADDR: 0x00000000
Decoding stack results
0x400d09a0: loop() at C:\Users\Me\Documents\Arduino\ESP32_ButtonTest/ESP32_ButtonTest.ino line 14
0x400e3e92: loopTask(void*) at C:\Users\Me\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\cores\esp32\main.cpp line 17