User manual

Software Examples
www.ti.com
3.2.1 Source File Structure
The project is split into multiple files. This makes it easier to navigate and reuse parts of it for other
projects.
Table 6. Source File and Folders
Name Description
main.c The demo's main function, shared ISRs, and so on
sl_common.h Common SimpleLink™ technology definitions
Driver: board Board specific driver including basic initializations
Driver: cli_uart Command line interface for backchannel UART communication
Driver: spi_cc3100 MSP432 SPI driver to interface CC3100
Driver: uart_cc3100 MSP432 UART driver to interface CC3100
Library: mqtt MQTT protocol library
Library: simplelink Simplelink library containing Wi-Fi APIs
Library: driverlib Device driver library (MSP432DRIVERLIB)
3.2.2 Running the Demo
In order to connect the CC3100BOOST to a wireless access point, start by modifying SSID_NAME and
PASSKEY in the #define section of main.c with your wireless access point's information. You may also
need to change SEC_TYPE depending on your access point's setting.
Next, using TI Cloud tools or offline IDEs, build and download the project to the MSP432 LaunchPad. If
not already, plug the CC3100BOOST BoosterPack onto the LaunchPad, and connect the LaunchPad to
your computer. The CC3100 should automatically try to connect to the access point with the provided
credentials. The LaunchPad outputs status messages through its Application/User UART COM port, which
can be viewed by opening it using terminal applications (see Section 2.3.2).
Once the CC3100 has established internet connection and successfully subscribed to the public MQTT
broker server, the LaunchPad RGB LED is ready to be controlled with Twitter. Any public tweets in the
following format will change the RGB LED color on all MSPEXP432P401R LaunchPad running this
demo:
RGB(red_value, green_value, blue_value) #MSP432LaunchPad
The color parameters can be integers ranging from 0 to 255.
Pressing the left push button S1 on the LaunchPad publishes a 32-bit unique ID from the LaunchPad to
the MQTT broker, which then gets tweeted by the twitter account, @MSPLaunchPad. You may then use
this 32-bit Unique ID in your tweet message to control the RGB LED on the specific
LaunchPad+CC3100BOOST combination tied to that unique ID:
<32-bit unique ID> RGB(red_value, green_value, blue_value) #MSP432LaunchPad
20
MSP
EXP432P401R LaunchPad™ Evaluation Kit SLAU597March 2015
Submit Documentation Feedback
Copyright © 2015, Texas Instruments Incorporated