Skip to content

Commit

Permalink
Explain delay time choice in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosun committed Sep 19, 2017
1 parent f94c3d8 commit 1a70319
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ void loop() {
Serial.println("waiting for connection");
delay(1000);
} else {
delay(100);
// The interval between button down/up
// can be very short - e.g. a quick tap
// on the screen.
// We could lose some event if we
// delay something like 100ms.
delay(15);
}

// Process the incoming BLE write request
Expand All @@ -99,6 +104,8 @@ void loop() {

if(switchButton.isValueChanged()){
digitalWrite(LED_BUILTIN, switchButton.getValue());
Serial.print("USR LED new value =");
Serial.println(switchButton.getValue());
}

if(slider.isValueChanged()){
Expand Down

0 comments on commit 1a70319

Please sign in to comment.