Learn How To Read SensorTag Sensors. This app displays all the sensors available in the Texas Instruments SensorTag. Note that you must run this app in the Evothings client app, or build a Cordova app with the plugin com.evothings.ble. Device with support for Bluetooth 4.0 is required.
You can browse the source code for this example at the Evothings GitHub repository
The file index.html is the main file of the app, which also contains JavaScript code for the app that communicates with the SensorTag using BLE.
This examples uses a high-level JavaScript library for the SensorTag found in file ti-sensortag.js.
This example runs in Evothings Client on Android or iOS.
You need to run the example in the Evothings client app. Alternatively, you can make a Cordova application if you wish to distribute the app. You then need to include the Cordova plugin com.evothings.ble. See page Evothings Client for further details.
An iOS device or an Android device with support for Bluetooth 4.0 (which includes BLE) is required. For Android version 4.3 or later is needed. Please note that BLE support on Android is still not fully mature. As a result, you may experience difficulties running this example. If the app stops working, restart the Evothings client app and/or reset Bluetooth on the device.
You need the Texas Instruments SensorTag to run this example app, it sells from Texas Instruments website for 25$ and has in-all six different MEMS sensors on-board; accelerometer, gyroscope, magnetometer, IR temperature, humidity and barometric pressure (and a BLE radio of course).
Please make sure your SensorTag is upgraded to firmware version 1.5 or higher, since this is needed for this example to work properly.
Follow these steps to get started with this example: