Type Function
Library system.*
Return value none
Revision Current Public Release (2016.2949)
Keywords accelerometer
See also accelerometer


Sets the frequency of accelerometer events. On the iPhone, the minimum frequency is 10 Hz and the maximum is 100 Hz. Accelerometer events are a significant drain on battery, so only increase the frequency when you need faster responses.


Battery Life

If possible, lower the frequency to conserve battery life.


On iOS devices, these are the frequency limits:

  • Maximum value: 100 Hz
  • Minimum value: 10 Hz

Default values

On iOS, the default is not documented. Based on past observations, the frequency default is typically low, e.g. 10 Hz.

On Android, the default is about 10 Hz (exact timing is definitely not guaranteed).

To be safe, you should set this yourself.


system.setAccelerometerInterval( frequency )


-- Set the measurement interval to 50 Hz.
-- This makes the system take 50 measurements per second.
system.setAccelerometerInterval( 50 )