Arduino timer
how access timer? is there handle?
i verify time required compute calculation.
more i'm computing position acceleration , need time calculate integral.
thanks!
i verify time required compute calculation.
more i'm computing position acceleration , need time calculate integral.
thanks!
if milliseconds precise enough, can use millis() returns number of milliseconds since last reset. stick current value of millis() in variable, execute task, call millis() again , substract previous value number of elapsed milliseconds.
if worried millis() taking time , messing accuracy, can test replacing task delay(10) , seeing if 10 elapsed ms. try different values , if error (if any) consistent, can substract error results in final sketch.
if worried millis() taking time , messing accuracy, can test replacing task delay(10) , seeing if 10 elapsed ms. try different values , if error (if any) consistent, can substract error results in final sketch.
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Arduino timer
arduino
Comments
Post a Comment