Getting Started with the Internet of Things (IoT) using the Texas Instruments CC3200
Featuring: CC3200 SimpleLink Wi-Fi LaunchPad
Presented by Dr. Thad B. Welch, P.E.
This material is from a workshop given at ASEE 2015 conference in Seattle, WA. Learn more about ASEE at http://www.asee.org/
You can find the slides from the workshop below.
To do the workshop, you will need a CC3200-LAUNCHXL LaunchPad
development kit. To find more about the specs of the CC3200 LaunchPad go
to http://www.ti.com/tool/cc3200-launchxl. To find more information about LaunchPad go to http://www.ti.com/launchpad.
In order to program the example code, you will need to download the Energia IDE. You can find the latest version 16+ at www.energia.nu/download.
The sample code used in the workshop is the sample code available inside of the Energia IDE.
First
make sure your development environment is correctly set up. We will run
the blink example by going to File > Examples > Basics >
Blink. Upload the code using the right arrow button next to the check
mark button. If the LaunchPad LED blinks at a 1 second interval without
errors you are ready. If you do not, you may need to install the drivers
for your LaunchPad under the Getting Started Guide installation
instructions. Go to www.energia.nu/guide and
select your operating system and then find the LaunchPad you have
(CC3200-LAUNCHXL) and you will find the link to download the drivers.
For the lab, we are going to use the Temboo cloud service to get the weather report whenever we push a button. Go to www.temboo.com/hardware/ti and sign up for an account. Once logged in find the GetTemperature API under Yahoo > Weather > GetTemperature.
Make sure IoT mode is on. You can add a new connection which will let you type in your WiFi router information.
Enter the address you want to get the temperature from and Temboo will generate the Energia code for you. You can copy and paste that into Energia and upload it to the board.
Make sure to include the TembooAccount.h. To add this click the small down arrow and select new Tab. Call the new tab TembooAccount.h and click ok. You should have a blank area where you can past the TembooAccount.h information.
When you upload the code, click the Serial Monitor (magnifying glass in the upper right corner) in Energia and you should see the LaunchPad connecting to Wi-Fi and getting the temperature data.
To modify the code, so that it is pushbutton activated. Simply take the part where it does the choreo call in the loop function and enclose that with an if(digitalRead(PUSH2) == 0) and it will only query the temperature when the button is pushed.
To view the Temboo Tutorial go to www.energia.nu/temboo
The Temboo site does a great job of explaining how to use their APIs so refer there for additional help.
Comments