Calibrating Timer

Hey fam,

I want to be able to measure how ‘in time’ a user’s rhythm is by them tapping (the on screen button) along with a metronome.
I can take that data and look how close they are to the beat.

I’m using the timer set to a 1 second interval then looking at the miliseconds of when the button was pressed.

The issue I’m having is that the timer is getting out of sync every time it loops.

I’m using this block to test. Every time the value is decreasing by about 40 milliseconds (althought this number jumps around a bit).
Screen Shot 2023-08-05 at 8.05.23 pm

Screen Shot 2023-08-05 at 8.07.14 pm

Here is the project link:
https://x.thunkable.com/projectPage/64797d7e3168990309e21c79

Any help would be greatly appreciated.

if you need accuracy use the ‘time since 1970’ block within the ‘device’ section. That will give you the most accurate times. Each time a user taps it will log the “seconds” and then you can to the math yo get the times just like with a timer. The reason youre getting the timer out of sync is because it takes time to loop through all of the commands. When you add up milliseconds it will eventually throw it all off. Hope this helps.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.