So I want to try and get pitch data every x milliseconds.
I tried:
while(1) {
wiiuse_poll(wiimotes, 1);
printf("wiimote pitch = %f\n", wiimotes[0]->orient.pitch);
usleep(x*1000);
}
This appears to get "lagged" pitch data. As if the events are being stacked up faster then I am polling them. How can I turn this into a synchronous system? I do not want a function to be called every time there is an "event", instead I want to get the pitch and key press data every x milliseconds.
Is this possible?
Thanks for any help!
p.s: great project!!
|