TI SensorTag CC2541 Demo

Demo of TI SensorTag CC2541. This app charts data from the TI SensorTag CC2541. If you have the TI SensorTag CC2650 released 2015, please check out the example TI SensorTag CC2650 Demo.

This example uses direct low-level access to BLE services and characteristics of the SensorTag. This is useful for study purposes or if you want to handle details of the communication with the SensorTag yourself. For an easy-to-use high-level SensorTag library please see the examples TI SensorTag Accelerometer and TI SensorTag Sensors.

Run this app in Evothings Viewer, or build a Cordova app with the plugin com.evothings.ble. Device with support for Bluetooth 4.0 is required.

Source code

You can browse the source code for this example at the Evothings GitHub repository

The file index.html is the entry point of the app.

The file File app.js contains JavaScript code for the app that communicates with the SensorTag using BLE.

What you need

This example runs in Evothings Viewer on Android or iOS.

You need to run the example in Evothings Viewer. 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. Read more in the documentation of the Evothings Viewer.

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 Evothings Viewer and/or reset Bluetooth on the device.

You need the TI SensorTag CC2541. Please make sure it is upgraded to firmware version 1.5 or higher.

How to get up and running

Follow these steps to get started with this example:

  • Run Evothings Workbench on your desktop/laptop computer.
  • Run Evothings Viewer on an Android mobile device and connect to the Workbench.
  • Launch the example "TI SensorTag CC2541 Demo" from the Workbench window.
  • Press the "activate" button on the SensorTag.
  • Touch the "Start" button in the app.
  • If everything works, the app should detect the SensorTag and start plotting magnetometer data on the canvas.