Closed m50008 closed 5 years ago
GPIO 0 has a "special" function. it is needed to put the ESP8266 into Flash mode. It has a internal Pull-up Resistor. GPIO 0 = LOW --> Flash mode. I suggest using a different GPIO as per default in the Sketch!
Is there a chance to user GPIO 0 as output pin?
I have designed a circuit board(forgot the use of GPIO 0) and the output is now connected to this pin.
For example this works
uint8_t pin = D3;
void setup() {
pinMode(pin, OUTPUT);
}
void loop() {
digitalWrite(pin, LOW);
delay(1000);
digitalWrite(pin, HIGH);
delay(1000);
}
i believe PWM is disabled when it is set to value 0. In your case when you set digitalWrite(pin, LOW)
the pullup resistor is somehow canceled.
Does pins[] = {D1,D2,D3};
in line 37 change the pins? I think even when writing different pins there pin D0-D2 is setup as output.
Because I wrote a print function in the setup method into the for loop where the pins are declared as output like this serial.printf("pin %d set as output", pins[pin]);
and the output stays always the same. Pin D0-D2 are allways set as output, even when writing complete different pins in line 37
Pins are assigned without D, just gpio pin number. Ex pins[] ={5,12,13}
But even so, the output stays the same. I can write every pin there
Now everything works, when deleting lines 421-423 and lines 658-660. Now i can define the pins as i want, the output of my print method gives the pins i have declared and the led strip works, even with pin D3 or gpio0 pins[0] = (uint8_t) json["r"]; pins[1] = (uint8_t) json["g"]; pins[2] = (uint8_t) json["b"];
and pins[0] = server.arg("red").toInt(); pins[1] = server.arg("green").toInt(); pins[2] = server.arg("blue").toInt();`
i believe the issue is that you flash the firmware without to choose SPIFFS. If you want to give it one more try select on flash type 4M with 3M SPIFFS
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 2 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed as it has not had any recent activity. Thank you for your contributions.
Hello, i think there is a problem with the pin D3 (GPIO 0). When setting pin d3 as output for the strip
pins[] = {D1,D2,D3};
in line 37 the output of the pin stays high, even when the strip is turned of using the hue app. The other pins are working fine but pin d3 stays at 3.3v.