- Thu Jul 06, 2017 5:10 pm
#68005
There's also a possibility the LED is just burnt out and the rest of the ESP is still functioning.
Change the blink sketch a bit, like this:
Code: Select all#define led_pin BUILTIN_LED
#define led_interval 500
void setup() {
Serial.begin(115200); // Initialize serial for communication
Serial.setDebugOutput(false); // Turn off WiFi debug messages for now
Serial.print("Setting pin mode of pin ");
Serial.print(led_pin);
Serial.println(" to OUTPUT");
pinMode(led_pin, OUTPUT);
}
void loop() {
Serial.print("Setting pin ");
Serial.print(led_pin);
Serial.println(" to HIGH");
digitalWrite(led_pin, HIGH);
delay(led_interval);
Serial.print("Setting pin ");
Serial.print(led_pin);
Serial.println(" to LOW");
digitalWrite(led_pin, LOW);
delay(led_interval);
}
...turn on the serial monitor ("Tools" -> "Serial Monitor") and upload the sketch to the device.
The serial monitor should show this after the upload is finished:
Code: Select allSetting pin mode of pin 2 to OUTPUT
Setting pin 2 to HIGH
Setting pin 2 to LOW
Setting pin 2 to HIGH
Setting pin 2 to LOW
Setting pin 2 to HIGH
Setting pin 2 to LOW
Setting pin 2 to HIGH
Setting pin 2 to LOW
Setting pin 2 to HIGH
Setting pin 2 to LOW
When you're getting a different number than pin 2 (eg. "pin 16"), it means you've selected the wrong board under "Tools" -> "Board:".
Assumption is the mother of all f*ckups. At least: that's what I'm assuming.