Before You Start
1You'll need a free Texas Instruments account to use their online IDE, CCS Cloud. You can sign up here.
2If you haven't already done so, prepare your board for making secure connections by following our Setting up CC3220 for SSL tutorial.
3Log in to Temboo. If you don't already have an account, you can sign up for free.
Set Up Your Sensor
1Once you're logged in, go to our code generation tool and find the Gmailv2 > Messages > SendMessage Choreo. A Choreo is a cloud-based process that connects your CC3220 to any web-based service, and every Temboo application is associated with at least one Choreo.
2Use the dropdown menu at the top of the Choreo page to select a CC3220 board as your device.
3The first step in monitoring sensor data is to set up the sensor you wish to monitor. We provide unit converted data for specific sensor models, such as Celsius and Fahrenheit for temperature sensors. We also support unconverted data which is reported as raw values for analog data and high/low for digital. Your motion sensor will return values of "detected" and "undetected".
For this tutorial we're going to read temperature data from a Panasonic EKMC160112. Our unit conversion formula assumes that your temperature sensor is connected to your CC3320's 5V pin for its voltage in, and set up as specified in the sensor's data sheet.
Using the virtual pin board on the Choreo page, select pin 04 to set up your sensor. Select the category 'Motion', then choose the Panasonic EKMC160112.
4Each time you set up a digital sensor you'll be asked to specify the safe state. This setting will determine the color coding of the data that appears on your graph. Safe data is colored green, and unsafe data is red.
Set the safe state as undetected. That's all we need to do to set up our sensor, so press Save.
5We will focus on getting sensor data graphs running first. In part 2 of this tutorial, we will set up the email alert. So for now, set a condition based on that sensor in order to run the SendMessage Choreo as infrequently as possible. Use the conditions interface to set a condition that will usually be false, and set the frequency to once a day.
Generate your code
6Next, we'll generate the code that will send our sensor data to Temboo. Scroll down and find the Code section. Click the triangle to open the Code menu and choose Data Viz.
7Now you will register your device. To do so, name your device and, optionally, give it a description. Specify the device location—this will allow you to view your devices on a map. For testing purposes, it's good to set a relatively short sensor interval so that you can see sensor data populate your graphs quickly. You can use the custom interval option for this. Press Save when you're done.
Run your code
8Click the "Send to CCS Cloud" button to the right of your generated code. Name your application, then click Send. Click the link that appears to visit the CCS Cloud IDE in your browser.
9Plug your CC3220 board into your computer via USB. Select its USB connection in CCS Cloud via the Target > Connect COM port... menu.
10Now, run the code on your CC3220 from CCS Cloud.
View your sensor data graph
11Now that your graphing application is running on your CC3220, keep this Choreo page open, and save it for later to use with part two of this tutorial. Open a new browser window to head over to your Devices page to see it in action. A virtual representation of your device will be waiting for you.
12Select your new device and you'll see a sensor data graph for the sensor that you set up. Over time, you'll be able to see sensor data graphs for various time periods. Additionally, at any time, you can request the latest value of your sensors. This is a handy feature for when you're between sensor intervals but want to know what's happening on your device.
That's it! You now know how to monitor sensor data with Temboo. Follow along with part two of this tutorial to add email alerts triggered by sensor values to your new application.
Need help?
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.