I want get a 200Hz by the accelerometer.

I need the acquisition of 200Hz by the accelerometer.

Use iPhone:AccelerometerUpdateInterval.

but it automatically resets to 0.01.


I want to know how I can get a 200Hz.


Please teach me.

Answered by Claude31 in 195547022

On which iPhone ?


I read here that frequency is 2 kHz and 4 kHz:

http : / / www.macrumors.com/2014/09/26/iphone-6-6-plus-two-accelerometers/


On the other hand, for iPhone5, there seems to be here a confirmation that max sampling is 100 Hz

http : / / stackoverflow.com/questions/12993027/changes-in-accelerometer-gyroscope-limitations-for-iphone-5-5th-gen-ipod-tou


Finally, there are 2 methods for accessing sensor data. May be one of them allows for faster sampling :

Accessing Sensor Data

Core Motion provides two mechanisms for accessing sensor data. For periodic, passive access to motion data, activate the appropriate sensor (for example, startAccelerometerUpdates) and then access the data from the corresponding motion data property on theCMMotionManager object (accelerometerData).

In cases where polling is not sufficient, you can use a block-based update mechanism that executes a block that you provide for each sensor update (for example, startAccelerometerUpdatesToQueue:withHandler:). When using the handler methods, be sure to set the update interval for the sensor (accelerometerUpdateInterval). The interval is capped at minimum and maximum values, so if the actual frequency is critical to your app, make sure to check the timestamp associated with the data object passed to the block.

http : / / apprize.info/apple/ios_2/15.html

Accepted Answer

On which iPhone ?


I read here that frequency is 2 kHz and 4 kHz:

http : / / www.macrumors.com/2014/09/26/iphone-6-6-plus-two-accelerometers/


On the other hand, for iPhone5, there seems to be here a confirmation that max sampling is 100 Hz

http : / / stackoverflow.com/questions/12993027/changes-in-accelerometer-gyroscope-limitations-for-iphone-5-5th-gen-ipod-tou


Finally, there are 2 methods for accessing sensor data. May be one of them allows for faster sampling :

Accessing Sensor Data

Core Motion provides two mechanisms for accessing sensor data. For periodic, passive access to motion data, activate the appropriate sensor (for example, startAccelerometerUpdates) and then access the data from the corresponding motion data property on theCMMotionManager object (accelerometerData).

In cases where polling is not sufficient, you can use a block-based update mechanism that executes a block that you provide for each sensor update (for example, startAccelerometerUpdatesToQueue:withHandler:). When using the handler methods, be sure to set the update interval for the sensor (accelerometerUpdateInterval). The interval is capped at minimum and maximum values, so if the actual frequency is critical to your app, make sure to check the timestamp associated with the data object passed to the block.

http : / / apprize.info/apple/ios_2/15.html

Thanks!

I use iPhone5s.

I got 200 Hz using timeInterval:


Best Regards

I want get a 200Hz by the accelerometer.
 
 
Q