Type Function
Library system.*
Return value none
Revision Release 2024.3703
Keywords gyroscope
See also gyroscope


Sets the frequency of gyroscope events in Hz. Gyroscope 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


system.setGyroscopeInterval( frequency )
frequency (required)

Number. Sets the sample interval in Hertz (cycles per second), i.e. the number of measurements to take per second. If you set the frequency to 10, then the system will take 10 measurements per second.


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