Software apps and online services
Welcome to the IAP IoT Fest 2016 with Texas instruments! This page will walk you through all the labs and should point you to all the resources you need to start hacking with TI hardware and the IoT.
Lab 0: Blink an LED
The goal of this lab is to verify the hardware and software is setup correctly and to give the student a first taste of rapid prototyping in Energia.
1. Plug in your LaunchPad with the supplied USB cable.
2. Open Energia.
3. From the Tools menu at the top of the window, select Boards -> LaunchPad w/ MSP432 EMT (48MHz).
4. From the Tools menu at the top of the window, select Serial Port, and then pick the serial port associated with your MSP432 Launchpad.
5. From the File menu at the top of the window, select Examples -> 01. Basics -> Blink. This will open the blink example program.
6. Examine the code to see the basic structure of the program.
a. All Energia programs have two required functions: setup() and loop().
i. Setup() is run once at startup
ii. Loop() runs continuously after that
b. pinMode is used to set the direction of a GPIO.
c. digitalWrite is used to set the state of a GPIO.
d. delay pauses execution for a given number of milliseconds.
7. Click the red arrow pointing to the right at the top left of the Energia window. This will compile and upload your program to the board.
8. After programming completes verify that the red LED is blinking on your LaunchPad.
9. To take this a step further try:
a. Fading the LEDs by changing the calls from digitalWrite to analogWrite.
b. Try using the other colored LEDs on the board
Lab 1: Side Kick
This lab is hosted on the Energia website here:
The purpose of this lab is get acquainted with the SideKick BoosterPack and loose components kit from SEEED Studios. Addional labs and resources can be found here: http://energia.nu/guide/sidekick/
The goal of this lab is to familiarize the student with the concept of a BoosterPack and how software libraries can speed development of advanced applications.
1. Plug the Educational BoosterPack MKII into the LaunchPad’s BoosterPack headers.
2. From the File menu at the top of the window, select Examples -> 09.EducationalBP_MKII -> AccelerometerLED
3. Read through the code. There is a line you will need to comment in in order to change the ADC resolution so the example works correctly. Comment in this line before proceeding to the next step.
4. Click the red arrow pointing to the right at the top left of the Energia window. This will compile and upload your program to the board.
5. Verify the color of the RGB LED changes when you tilt the board.
6. Select Examples->09.EducationalBP_MKII ->OPT3001_Demo and Examples->09.EducationalBP_MKII ->TMP006 to see some other sensors on the Educational BoosterPack.
7. Use the Magnifying Glass icon in the upper right corner to open a serial COM. The sensor data will be displayed here.
8. Experiment with other examples for the Educational BoosterPack. Trying combining multiple examples to build a full application.
a. This time is meant to be free form so you can experiment and learn on your own.
b. If you wish to try one of the LCD examples you'll need to drop
the Screen_HX8353E.cpp (found at the bottom of this page) file into:
Grove Starter Kit for LaunchPad is a co-branded quick starter kit for Texas Instruments LaunchPad Development Kits. This kit carries one Grove Base BoosterPack and 10 carefully selected Groves modules. It enables users of the Texas Instruments Launchpad to rapidly prototype and hack together fun microcontroller-based projects.
1. Plug the Grove Base BoosterPack on top of the MSP432 LaunchPad
2. Connect the Light Sensor to J6(A) and the 4-Digit Display to J14(D), as shown below
a. The left side of the BoosterPack is for analog inputs (0V-3.3V)
b. The right side of the BoosterPack is for digital inputs and outputs
c. The top of the board has SPI, I2C, and UART serial communications connections
3. Download the Grove Starter Kit code here (click download ZIP) and unzip the folder. To use this library, add the GroveModulesLib folder to \Documents\Energia\Libraries and add the Grove_Modules_Examples folder to \Documents\Energia
4. Close and restart Energia
5. Select Sketchbook->Grove_Modules_Examples->Light_Sensor
6. In the setup() function, add the line
analogReadResolution(12); to increase the resolution of the ADC.
7. Click the red "Run" arrow to compile the program and download it to the LaunchPad
6. Try out the other Grove modules in the Sketchbook->Grove_Modules_Examples menu. Try combining 3-4 modules to create a full application!
More info here: http://energia.nu/guide/grove-starter-kit/grove_sensingthelight/
Lab 4: MSP432 + Wi-Fi (CC3100) and Temboo
1. Plug the CC3100 BoosterPack into the bottom of the LaunchPad. The stack should now be:
a. Educational BoosterPack MKII
b. MSP432 LaunchPad
c. CC3100 BoosterPack
2. Create a new program in Energia (File -> New)
3. Go to your Temboo account and navigate to the Yahoo choreos, then click Weather and choose "GetWeatherByAddress"
4. Make sure "IoT Mode" is turned ON
5. In the Input section, type your address in the Address field and click the Run button to test the Choreo
a. You can expand "Optional Inputs" to change the units to Fahrenheit
6. Create a new program in Energia (File->New)
7. At the bottom of the page, copy the generated Code into the new Energia sketch.
8. Create a new tab in Energia by clicking the Arrow on the right side of the toolbar, and selecting "New Tab"
a. Name this tab TembooAccount.h
b. Copy the Header File from tembo into this new tab. Be sure to change the Wi-Fi SSID and Password.
9. Click the run arrow, and open the serial COM. You should see the weather condition print over serial.
10. Try some advanced features of Temboo like the ability to trigger a Choreo based on a hardware event, or to trigger a hardware event based on a Choreo
a. Is this Choreo triggered by a sensor event?
b. Should an output trigger a hardware event?
11. Try some other Choreos. Here are some that I suggest:
a. Nexmo - send and receive SMS, place phone calls
c. Wolfram Alpha
Lab 5: Pulling it all Together
In this lab, we will use the same setup from the previous lab, but send the sensor data we receive over an IoT protocol called MQTT. MQTT is a publish-subscribe based lightweight messaging protocol for use on top of the TCP/IP protocol. It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited.
MQTT is perfect for IoT applications because many devices can publish data to a common place and many devices can read that same data from a common place.
We are also going to introduce a new concept called Energia MT, or Multi Tasking. Energia MT lets us write a sketch in parallel on a single device.
The full instructions for Lab 4 can be found here.