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

accelerometerOff()

SensorTag CC2541. Public. Turn off accelerometer notification.

public

accelerometerOn()

SensorTag CC2541. Public. Turn on accelerometer notification.

public

barometerOn()

SensorTag CC2541. Public. Turn on barometer notification.

public

deviceIsSensorTag()

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

public

getAccelerometerValues(data)

SensorTag CC2541. Calculate accelerometer values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getBarometerValues()

SensorTag CC2541. Calculate barometer values from raw data.

public

getGyroscopeValues(data)

SensorTag CC2541. Calculate gyroscope values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getMagnetometerValues(data)

SensorTag CC2541. Calculate magnetometer values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: x, y, z.

public

getTemperatureValues(data)

Calculate temperature values from raw data.

Parameter

Name Type Optional Description

data

 

 

an Uint8Array.

Returns

Object with fields: ambientTemperature, targetTemperature.

public

gyroscopeCallback(fun, interval, axes)

Public. Set the gyroscope notification callback.

Parameters

Name Type Optional Description

fun

 

 

success callback called repeatedly: fun(data)

interval

 

 

gyroscope rate in milliseconds.

axes

 

 

the axes to enable ((z << 2) | (y << 1) | x) Axis parameter values are: 1 = X only, 2 = Y only, 3 = X and Y, 4 = Z only, 5 = X and Z, 6 = Y and Z, 7 = X, Y and Z.

public

gyroscopeOff()

Public. Turn off gyroscope notification (SensorTag CC2541).

public

gyroscopeOn()

SensorTag CC2541. Public. Turn on gyroscope notification.

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

isMagnetometerAvailable()

Public. Checks if the magnetometer sensor is available.

public

isTemperatureAvailable()

Public. Checks if the Temperature sensor is available.

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

magnetometerOff()

Public. Turn off magnetometer notification (SensorTag CC2541).

public

magnetometerOn()

Public. Turn on magnetometer notification (SensorTag CC2541).