Re: How many simultaneous timers
Posted: Wed Mar 01, 2017 7:18 pm
None of my posts have shown up yet, so I can't just fix them.
Anyway, looking more closely at the new help file, I see that in the example, timer 0 was used rather than timercb 0.
If that was the actual code used to test the timer, it gave a false sense of correctness, as timer 0 does not stop the timer set up with timercb, and "timercb 0" was not tested.
Anyway, looking more closely at the new help file, I see that in the example, timer 0 was used rather than timercb 0.
Code: Select all
Example:
Print “timer example”
Timercb 1000, [test]
Wait
[test]
If io(pi,d3) = 0 then
Timer 0
serialPrintln “timer has been disabled”
Else
serialPrintln “Button connected to d3 (gpio 0) is high”
Endif
return
If that was the actual code used to test the timer, it gave a false sense of correctness, as timer 0 does not stop the timer set up with timercb, and "timercb 0" was not tested.