Examples using Node.js library node-sensortag for TI SensorTag.
Some of the examples are based on Bluetooth LE examples for sensorTag by Tom Igoe.
- Prerequisites
- Install
- Upgrade NodeJS via NPM
- Raspberry Pi requirements Note that you simply need the bluetooth libraries, not the node-RED specific stuff.
Sensortag library functions are asynchronous. There is a sequence you need to follow in order to successfully read data from a tag:
- Discover the tag
- Connect to and set up the tag
- Turn on the sensor you want to use
- Turn on notifications for the sensor
- Listen for changes from the sensortag
Full package documentation can be found on node-sensortag homepage.