Test case:
- A pin (example pin 6) is configured as INPUT_PULLUP.
- Since this pin is pulled up it is expected that 'digitalRead' returns 'high' (something different than 0), which is the case with revision 2.0.7. However with 2.0.8 the command returns 0.
- If the pin is shorted to ground it is expected that 'digitalRead' returns 0, which is the case with revision 2.0.7. However with revision 2.0.8 the command returns 1.
Code: Select all
#define PIN_BUTTON1 6
void setup() {
pinMode(PIN_BUTTON1,INPUT_PULLUP); // Control button 1
Serial.begin(); // Status information reports
}
void loop() {
Serial.print("But1=");
Serial.print(digitalRead(PIN_BUTTON1));
Serial.print(", LOW=");
Serial.print(LOW);
Serial.print(", HIGH=");
Serial.print(HIGH);
Serial.println("");
Serial.flush();
delay(1000);
}
The pin is not shorted to ground (=it is pulled up):
Code: Select all
But1=0, LOW=0, HIGH=1
Code: Select all
But1=1, LOW=0, HIGH=1