Timer Accuracy on Particle Photon

If I wanted to fill up a large bucket with the Particle Photon, and wanted to keep track of the time it took for the water to pass certain points int he bucket, how accurately would I be able to do this?

What I am looking for is just an accurate “timer” function. Does this exist in the standard libraries of the Photon?

I think there are too many variables to do an accurate timed pour, I would suggest using a sensor to gauge the fill levels.

1 Like

Depending on your waterflow you can use millis() (for millisecond precission) or Time.now() (for seconds) or both together in conjunction with interrupts to get the trigger with a ~5µs latency - good enough?