- Wed Apr 19, 2017 2:11 pm
#194433
Hello!
I am having a great deal of trouble with the ESP8266 thing reading GPIO 4. I can clearly put 3.3 volts or 0.2 volts on it (LOW)
But for some reason it will not activate anything. Can someone look over this and tell me what I am doing wrong?
Here is the basic code I have been using to test it
Thank you
I am having a great deal of trouble with the ESP8266 thing reading GPIO 4. I can clearly put 3.3 volts or 0.2 volts on it (LOW)
But for some reason it will not activate anything. Can someone look over this and tell me what I am doing wrong?
Here is the basic code I have been using to test it
Code: Select all
The LED will not turn on? I don't think I shorted or burned the pin out because it looks directly connected to the micro controller.#define ESP8266_LED 5
#define READpin 4
int val;
void setup()
{
pinMode(ESP8266_LED, OUTPUT);
pinMode(READpin, INPUT);
}
void loop()
{
val = digitalRead(READpin);
if(val == HIGH){
digitalWrite(ESP8266_LED, HIGH); // LED off
}
else{
digitalWrite(ESP8266_LED, LOW); // LED on
}
}
Thank you