Skip to content

Commit 5c9442c

Browse files
author
Ivan Seidel
committed
Improved documentation
1 parent 366c7aa commit 5c9442c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

examples/CustomTimedThread/CustomTimedThread.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ ButtonThread *btn3Thread;
194194
*/
195195
void btn1Callback(){
196196
// When it's running, this thread will write to the serial.
197+
/*
198+
This math will print 'how long' the thread has been running,
199+
since the button was/is pressed.
200+
201+
After pressing it, it should print as 0, and goes up untill
202+
the thread duration (in this case, +-5000ms).
203+
*/
197204
Serial.print("BTN 1 Thread: ");
198205
Serial.println(millis() - btn1Thread._lastButtonPushed);
199206
}
@@ -224,7 +231,7 @@ void setup(){
224231
pinMode(LED, OUTPUT);
225232

226233
// Configure btn1Thread callback
227-
// (During the 'enabled' time, it will run every 50ms, aka Interval)
234+
// (During the 'enabled' time, it will run every 100ms, aka Interval)
228235
btn1Thread.onRun(btn1Callback);
229236
btn1Thread.setInterval(100);
230237

0 commit comments

Comments
 (0)