I have the following code:
while (digitalRead(INT_GPIO) == LOW) {
if (counter < 100) {
counter++;
} else {
if (powerchanged==false) {
powerchanged=true;
digitalWrite(Vext, HIGH); // HIGH = Vext OFF
}
}
delay(10);
}
It’s supposed to turn off Vext if INT_GPIO (user key) is pressed longer than a second, anyway I notice that anytime digitalRead is called I have a small glitch on Vext (it goes low) for a very short period.
It seems that reading the port3_3 (user_key) alters the state of port3_2 (Vext)
What I’m missing ?