Trouble with ESP8266 NODEMCU Getting it to work
Posted: Wed May 30, 2018 2:02 pm
I am trying to get Digital Read Serial to work to test it. My previous board did the same thing I ordered a new one, ditto.
I tried a different USB cable & then I tried a different USB port, same problem. Here is the error message & attached is the circuit:
Archiving built core (caching) in: C:\Users\Don XXX\AppData\Local\Temp\arduino_cache_687717\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_WIFI,FlashErase_none,UploadSpeed_115200_f86d0967029055693339ddfef193ea10.a
Sketch uses 249376 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 32388 bytes (39%) of dynamic memory, leaving 49532 bytes for local variables. Maximum is 81920 bytes.
error: Failed to open COM11
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
Here is the code:
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the Serial Monitor
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/DigitalReadSerial*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
int pushButton = 2;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
// make the pushbutton's pin an input:
pinMode(pushButton, INPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input pin:
int buttonState = digitalRead(pushButton);
// print out the state of the button:
Serial.println(buttonState);
delay(1); // delay in between reads for stability
}
I tried a different USB cable & then I tried a different USB port, same problem. Here is the error message & attached is the circuit:
Archiving built core (caching) in: C:\Users\Don XXX\AppData\Local\Temp\arduino_cache_687717\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_WIFI,FlashErase_none,UploadSpeed_115200_f86d0967029055693339ddfef193ea10.a
Sketch uses 249376 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 32388 bytes (39%) of dynamic memory, leaving 49532 bytes for local variables. Maximum is 81920 bytes.
error: Failed to open COM11
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
Here is the code:
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the Serial Monitor
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/DigitalReadSerial*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
int pushButton = 2;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
// make the pushbutton's pin an input:
pinMode(pushButton, INPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input pin:
int buttonState = digitalRead(pushButton);
// print out the state of the button:
Serial.println(buttonState);
delay(1); // delay in between reads for stability
}