ADC pin nodemcu 12E
Posted: Wed Apr 06, 2016 6:33 pm
I wanted to test the analog input of the nodemcu esp8266 12E, so I connected a led as a light sensor, positive leg to the ADC pin and negative leg to ground with this simple Arduino sketch:
void setup() {
pinMode(A0, INPUT);
}
void loop() {
analogRead(A0);
Serial.println(analogRead(A0));
delay(1000);
}
All I get is gibberish from the serial monitor. I have been using an Arduino UNO but this must work very differently. Any help would be appreciated.
void setup() {
pinMode(A0, INPUT);
}
void loop() {
analogRead(A0);
Serial.println(analogRead(A0));
delay(1000);
}
All I get is gibberish from the serial monitor. I have been using an Arduino UNO but this must work very differently. Any help would be appreciated.