evothings.tisensortag. SensorTagInstanceBLE_CC2650
Source: evothings-libraries/
SensorTag CC2650 instance object.
Property
Methods
Property
deviceModel
The device model.
Methods
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. |
barometerOn()
SensorTag CC2650. Public. Turn on barometer notification.
deviceIsSensorTag()
Determine if a BLE device is a SensorTag CC2650. Checks for the CC2650 using the advertised name.
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.
getBarometerValues()
SensorTag CC2650. Calculate barometer values from raw data.
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.
getHumidityValues(data)
SensorTag CC2650. Calculate humidity values from raw data.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
data |
|
|
an Uint8Array. |
- Returns
-
Object with fields: humidityTemperature, relativeHumidity.
getLuxometerValue(data)
SensorTag CC2650. Calculate luxometer values from raw data.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
data |
|
|
an Uint8Array. |
- Returns
-
Light level in lux units.
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.
getTemperatureValues(data)
SensorTag CC2650. Calculate temperature values from raw data.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
data |
|
|
an Uint8Array. |
- Returns
-
Object with fields: ambientTemperature, targetTemperature.
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. |
isAccelerometerAvailable()
Public. Checks if the accelerometer sensor is available.
isBarometerAvailable()
Public. Checks if the barometer sensor is available.
isGyroscopeAvailable()
Public. Checks if the gyroscope sensor is available.
isHumidityAvailable()
Public. Checks if the humidity sensor is available.
isKeypressAvailable()
Public. Checks if the keypress sensor is available.
isLuxometerAvailable()
Public. Checks if the luxometer sensor is available.
isMagnetometerAvailable()
Public. Checks if the magnetometer sensor is available.
isMovementAvailable()
Public. Checks if movement sensor is available that combines accelerometer, gyroscope, and magnetometer.
isTemperatureAvailable()
Public. Checks if the Temperature sensor is available.
luxometerOff()
SensorTag CC2650. Public. Turn off luxometer notification.
luxometerOn()
SensorTag CC2650. Public. Turn on luxometer notification.
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. |
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:
|
movementOff()
SensorTag CC2650. Public. Turn off movement notification (SensorTag 2).
movementOn()
SensorTag CC2650. Public. Turn on movement notification (SensorTag 2).
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. |