File tree Expand file tree Collapse file tree
examples/CustomTimedThread Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,6 +194,13 @@ ButtonThread *btn3Thread;
194194*/
195195void 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
You can’t perform that action at this time.
0 commit comments