Skip to main content
added 350 characters in body
Source Link
ewizard
  • 173
  • 4
  • 12

UPDATE I am now trying with GPIO0 as input. I have the switch wired to ground, and it leads to GPIO0. When I turn it on, GPIO0 reads 1 (on), then I use the switch and it turns the relay off correctly, then I try and turn it on again, and nothing happens, GPIO0 continues to be read at 0. So I can't use the switch past the initial off.

UPDATE I am now trying with GPIO0 as input. I have the switch wired to ground, and it leads to GPIO0. When I turn it on, GPIO0 reads 1 (on), then I use the switch and it turns the relay off correctly, then I try and turn it on again, and nothing happens, GPIO0 continues to be read at 0. So I can't use the switch past the initial off.

added 557 characters in body
Source Link
ewizard
  • 173
  • 4
  • 12

UPDATE I tried with this code to rule out that it might be aREST:

void setup() {
  // put your setup code here, to run once:
  pinMode(3, INPUT);
  pinMode(2, OUTPUT);

  // Start Serial
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  int read3 = digitalRead(3);
  Serial.print(read3);
  Serial.println(" input");
  digitalWrite(2, read3);
}

It always outputs 0 input, the ESP8266 seems to be ignoring that input pin.

UPDATE I tried with this code to rule out that it might be aREST:

void setup() {
  // put your setup code here, to run once:
  pinMode(3, INPUT);
  pinMode(2, OUTPUT);

  // Start Serial
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  int read3 = digitalRead(3);
  Serial.print(read3);
  Serial.println(" input");
  digitalWrite(2, read3);
}

It always outputs 0 input, the ESP8266 seems to be ignoring that input pin.

edited title
Link
ewizard
  • 173
  • 4
  • 12

digitalRead nonot reading input pin of ESP8266-01

added 70 characters in body
Source Link
ewizard
  • 173
  • 4
  • 12
Loading
Source Link
ewizard
  • 173
  • 4
  • 12
Loading