IO: Clarify SimpleInput example

As suggested by @msurguy
This commit is contained in:
gohai
2018-06-26 19:11:29 -07:00
parent d613f999c0
commit 0b4498e5d6

View File

@@ -12,10 +12,11 @@ void setup() {
}
void draw() {
// sense the input pin
if (GPIO.digitalRead(4) == GPIO.HIGH) {
if (GPIO.digitalRead(4) == GPIO.LOW) {
// button is pressed
fill(255);
} else {
// button is not pressed
fill(204);
}
stroke(255);