Skip to content

Commit

Permalink
Update DebounceAnalogSensor.ino
Browse files Browse the repository at this point in the history
fixed comment
  • Loading branch information
timonsku authored May 13, 2019
1 parent 03d7732 commit db0a268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/DebounceAnalogSensor/DebounceAnalogSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ void setup() {
Serial.begin(115200);
// Set a point where we consider our state to have crossed a threshold from false to true
sensor.setThreshold(370);
// Set an error margin, so anything below 112 will be considered below threshold
// and everything above 128 will be considered above threshold
// Set an error margin, so anything below 362 will be considered below threshold
// and everything above 378 will be considered above threshold
// this avoids getting spammed when the sensor reads close to the threshold
sensor.setErrorMargin(8);
// set intial state
Expand All @@ -29,4 +29,4 @@ void loop() {
}

delay(50);
}
}

0 comments on commit db0a268

Please sign in to comment.