IoT made easy with the TI SensorTag
The TI Bluetooth Smart SensorTag is a new type of smart device that packs many different sensors into a small battery-powered unit. You can use the SensorTag for a wide variety of IoT applications.
It is perfect to use the device for quick prototyping, for example new kinds of fitness applications, various sensor-based alarms, interaction devices that use the accelerometer/gyroscope, game controllers, smartwatch prototypes, sports sensors and much more. For all these, mobile applications play a central role to display information to the end user.
The Bluetooth Smart SensorTag uses Bluetooth Low Energy (BLE) to communicate with a mobile phone or tablet. There are also upcoming versions for WiFi and for 6LoWPAN/ZigBee. Support for these will be added to the Evothings Studio as they become available.
What you need to get started
Here is what you need to get up and running:
- TI Bluetooth Smart SensorTag (order at the TI web site)
- Evothings Studio (download for OS X, Windows and Linux)
- Evothings Client app (install on iOS or Android phones/tablets, get it from Apple App Store or Google Play)
- WiFi network that allows client connections (network client isolation must be disabled)
- Basic knowledge of Evothings Studio (you can also learn as you go through this tutorial)
- To build an application to distribute yourself you will need the Apache Cordova build tools
Good to know
If you are new to Evothings Studio, take a moment to read the Introduction in the documentation to get a basic understanding of the development tools used. We also recommend reviewing the Evothings Starter Guide.
Run the example apps
Try out the TI SensorTag Accelerometer example
The quickest way to get started with the device and the development environment is to explore the SensorTag example apps that comes with the Evothings Studio download:
- Launch Evothings Workbench on your computer
- Launch Evothings Client on your mobile phone(s), press SCAN and connect to the Workbench running on your computer
- Locate the example app “TI SensorTag Accelerometer” in the Workbench project list
- Click RUN
- Activate the SensorTag by clicking the activate button on the tag (see picture below)
- Hold the SensorTag with front side up and tilt it to move the Evothings Logo on the screen.
Make changes to the code
Next step is to try out making some changes to the code:
- Click CODE – this opens a file browser with the source code of the app
- Open file
index.htmlin a text editor and make some changes to the code. For example, change size of the
#spriteelement by changing the CSS width to this:
- Save the file
- The app will reload on all the connected mobile device(s) and reflect the updates
You can also change the image file
sprite.svg to your own image. Any image file (PNG, JPG, GIF) work just fine, but remember to update the image reference in the HTML code, for example:
<img id="sprite" src="MyImage.png" />
Explore more example apps
You should also explore the other example apps for the SensorTag. Here is a quick overview of the examples:
- TI SensorTag Accelerometer – move a UI object using the accelerometer (this example uses the high-level library tisensortag.js)
- TI SensorTag Sensors – displays all the sensors available (uses the high-level library tisensortag.js)
- TI SensorTag Demo – Charts sensor data on an HTML5 canvas (this is a low-level example that writes/read directly to the BLE services and characteristics of the SensorTag)
On the Evothings API overview page you will find more information about these libraries and links to technical documentation.
A good way to get started is to examine the TI SensorTag Sensors example app that comes with Evothings Studio and see how the
tisensortag.js library is used. This example is quite elaborate, and for a smaller example check out TI SensorTag Accelerometer.
How to create a custom SensorTag app
A project needs to have a main HTML file, which is the file launched when the app starts. This file is typically named “index.html”. Simply drag and drop your main HTML file into the Workbench project list, it will be added seamlessly and then click RUN to start it.
Here is a quick summary of the steps required to create an app for use with Evothings Studio:
- Create a folder for the app
- Drag the main HTML file into the Workbench window
- Click RUN
A quick and easy way to create a custom application is to just copy an example app and modify it. You can use the one of the SensorTag example app, or any of the example apps as a starting point.
Build a native app
In order to build a native app, you will need to generate a Cordova project and copy or move your files to the “www” folder in the Cordova project. Read more about Cordova and how it works in the Cordova IoT Starter Guide.
- TI SensorTag home page
- Evothings forum for TI technologies
- Evothings Starter Guide (getting started with Evothings Studio)
- Cordova IoT Starter Guide (for building native apps)
- Evothings download page
Get started now – up and running in 5 minutes
With Evothings Studio it is easy to prototype and develop IoT applications. Download Evothings Studio now and spend 5 minutes to get started. Order the TI SensorTag and familiarize yourself with Evothings Studio to be ready to hack away upon delivery of the device!