
We are interested in reading the number of microseconds that a digital pin is set to HIGH. Wiring natively lacks a micros() function to tell us this so we need to write an accurate one. This is the actual implementation of millis() in wiring.c for the Arduino. unsigned long millis() { // timer 0 increments every 64 cycles, and overflows when it reaches // 256. we would calcul...
© 2009 Created by Chris Anderson