Content:
- Methods

The sensor object can be used to access numerous sensors of your device.

sns = app.CreateSensor( type, options ) → app object: Sensor

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 “Fastest”, “Fast”, “Medium” or “Slow”. “Slow” is the default.

Example - GetNames click to expand contents 

Example - Accelerometer click to expand contents 

Example - Orientation click to expand contents 

Example - Light click to expand contents 

Methods

The following methods are available on the Sensor object:

GetAzimuth() → Number
GetNames() → String: comma “,” separated
GetPitch() → Number
GetRoll() → Number
GetType() → String: “Sensor”
GetValues() → List: [ time, first, second, third ]
Method( name, types, p1, p2, p3, p4 ) → all types
Start()
Stop()