The sensor object can be used to access numerous sensors of your device.
You can use the SetOnChange function of the Sensor to set the name of a function you want to be called when a the changes occur.
Change the rate that a sensor checks for changes by adding one the options
Methods
The following methods are available on the Sensor object:
Batch(
properties )
GetAzimuth() → Number
GetNames() → String: comma “,” separated
GetPitch() → Number
GetRoll() → Number
GetType() → String: “Sensor”
SetMaxRate(
rate )
SetMinChange(
min )
Start()
Stop()