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!

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.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Arduino timer


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums