I'm having some trouble with this ESP8266, to switch UP, DOWN, OFF dual relay, using Arduino code and a physical 3 states switch.
The code defines input GPIOs 12,14 as INPUT_PULLUP
to avoid cases that from time to time ( say once a day ), I get a phenomena that is typically for not using a pull-up resistor.
What can cause such a thing? Can it be that GPIO12, GPIO14 does not HAVE a pull-up resistor on-board?
Relevant code (that defines inputs and outputs):
void setup() {
Serial.begin(9600);
pinMode(switchUpPin, INPUT_PULLUP);
pinMode(switchDownPin, INPUT_PULLUP);
pinMode(relayUpPin, OUTPUT);
pinMode(relayDownPin, OUTPUT);
digitalWrite(relayUpPin,HIGH);
digitalWrite(relayDownPin,HIGH);