Languages

Menu
Sites
Language
How can I control sampling rate of sensor data??

I took gyrosensor data and accelerator data from sensor.

but the sampling rate is not enough to control gyro sensor data as one/s.

How can I control sampling rate of gyro sensor data??

thanks ^^

 

Edited by: bon jae koo on 11 Aug, 2014

Responses

4 Replies
flopo lopolus

so when we did this we used  setInterval() function to record the data from the devicemotion listener attached to the window.  If you do not have set interval and you just record every data point that is fired off from the devicemotion listener you will get about 24 -25 samples/sec for the accelerometer.

Gaurav Mishra

flopo lopolus, can you please elaborate on how you used the setinterval function? I am trying to do the same but am stuck. Your help would be appreciated!

smolin

I also interested in using setInterval(). Can you give some link or example? People say that this is impossible to do.

Andrew Liles
I'd be