sensor values periodical?

Flosch

Member
Licensed User
Longtime User
Is it possible to get the sensor values periodical?

For example I need the values of the accelerometer every 200ms.
I found only the SensorChanged Event in the Phone Lib to get the Values of the Sensors.
Is there another way to get the Values?
Or is it possible to trigger the SensorChanged Event with a timer to get the sensor value I need?

Thanks for your help.
 

klaus

Expert
Licensed User
Longtime User
Or is it possible to trigger the SensorChanged Event with a timer to get the sensor value I need?
No.
You can save the value you get in the SensorChanged Event in a global variable and take this value with a timer. That way you always have the current value of the sensor. As long as no SensorChanged Event is raised this value remains constant.

Best regards.
 
Upvote 0
Top