mirror of
https://github.com/processing/processing4.git
synced 2026-02-09 08:39:33 +01:00
IO: Clarify SimpleInput example
As suggested by @msurguy
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user