Property

Property

public

deviceModel

The device model.

Methods

public

accelerometerCallback(fun, interval)

Public. Set the accelerometer notification callback.

Parameters

Name Type Optional Description

fun

 

 

success callback called repeatedly: fun(data)

interval

 

 

accelerometer rate in milliseconds.

public

barometerOn()

SensorTag CC2650. Public. Turn on barometer notification.

public

deviceIsSensorTag()

Determine if a BLE device is a SensorTag CC2650. Checks for the CC2650 using the advertised name.

public

getAccelerometerValues(data)

SensorTag CC2650. Calculate accelerometer values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getBarometerValues()

SensorTag CC2650. Calculate barometer values from raw data.

public

getGyroscopeValues(data)

SensorTag CC2650. Calculate gyroscope values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getHumidityValues(data)

SensorTag CC2650. Calculate humidity values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: humidityTemperature, relativeHumidity.

public

getLuxometerValue(data)

SensorTag CC2650. Calculate luxometer values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Light level in lux units.

public

getMagnetometerValues(data)

SensorTag CC2650. Calculate magnetometer values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getTemperatureValues(data)

SensorTag CC2650. Calculate temperature values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: ambientTemperature, targetTemperature.

public

gyroscopeCallback(fun, interval)

Public. Set the gyroscope notification callback. Enables all axes.

Parameters

Name Type Optional Description

fun

 

 

success callback called repeatedly: fun(data)

interval

 

 

gyroscope rate in milliseconds.

public

isAccelerometerAvailable()

Public. Checks if the accelerometer sensor is available.

public

isBarometerAvailable()

Public. Checks if the barometer sensor is available.

public

isGyroscopeAvailable()

Public. Checks if the gyroscope sensor is available.

public

isHumidityAvailable()

Public. Checks if the humidity sensor is available.

public

isKeypressAvailable()

Public. Checks if the keypress sensor is available.

public

isLuxometerAvailable()

Public. Checks if the luxometer sensor is available.

public

isMagnetometerAvailable()

Public. Checks if the magnetometer sensor is available.

public

isMovementAvailable()

Public. Checks if movement sensor is available that combines accelerometer, gyroscope, and magnetometer.

public

isTemperatureAvailable()

Public. Checks if the Temperature sensor is available.

public

luxometerOff()

SensorTag CC2650. Public. Turn off luxometer notification.

public

luxometerOn()

SensorTag CC2650. Public. Turn on luxometer notification.

public

magnetometerCallback(fun, interval)

Public. Set the magnetometer notification callback.

Parameters

Name Type Optional Description

fun

 

 

success callback called repeatedly: fun(data)

interval

 

 

magnetometer rate in milliseconds.

public

movementCallback(fun, interval, sensors)

SensorTag CC2650. Public. Set the movement notification callback. Movement callbacks are routed back to accelerometer, gyroscope, and magnetometer callbacks.

Parameters

Name Type Optional Description

fun

 

 

Success callback called repeatedly: fun(data)

interval

 

 

Sensor rate in milliseconds.

sensors

 

 

Set the config that turns on the needed sensors:
Magnetometer on: 64 (1000000) (seems to not work in ST2 FW 0.89)
3-axis acc. on: 56 (0111000)
3-axis gyro on: 7 (0000111)
3-axis acc. + 3-axis gyro on: 63 (0111111)
3-axis acc. + 3-axis gyro + magnetometer on: 127 (1111111)

public

movementOff()

SensorTag CC2650. Public. Turn off movement notification (SensorTag 2).

public

movementOn()

SensorTag CC2650. Public. Turn on movement notification (SensorTag 2).

static

luxometerCallback(fun, interval)

Public. Set the luxometer notification callback.

Parameters

Name Type Optional Description

fun

 

 

success callback called repeatedly: fun(data)

interval

 

 

luxometer rate in milliseconds.