Software apps and online services
Hand tools and fabrication machines
The goal of this project is to get a CC3200 connected to a Blynk app on either your Android or iOS device. Blynk is an IoT platform that lets you create a custom mobile app to communicate with an internet connected microcontroller.
The Texas Instruments CC3200 LaunchPad is a great candidate for this project. It's powerful Wi-Fi SoC allows us to easily connect to the internet and the on-board BMA222 Accelerometer and TMP006 infrared temperature sensor will let us read some useful data without any external components.
First, let's create the mobile application. To start, create a Blynk account by installing the Blynk app on your Android or iOS device. In the app, click the + button to create a new project. Name your project, and select TI-CC3200-LaunchXL for your hardware. You will also see an Auth Token created for you. This is specific to your project and how the Blynk App will identify the CC3200 LaunchPad. Go ahead and email this token to yourself so you can copy and paste it into your app later.
Next, add the necessary widgets to your app with the + button. Add 3 Graph widgets, 1 Button widget, and 1 Value Display widget. Configure them as show in the screenshots below.
Each of the widgets is assigned a virtual pin. We will use these virtual pins in the embedded code to communicate with the app. You will see in the code below where we define the button (V1) to control the Red LED on the LaunchPad, V5 to read the temperature sensor, and V6-V8 to read the accelerometer data.
I arranged the widgets in my app like this:
If you haven't, install Energia. You can find download links and some more information about Energia here: www.energia.nu
Now, download the Blynk libraries here: https://github.com/blynkkk/blynk-library/releases
Extract the .zip file and copy the folder "Blynk" and "SimpleTimer" to \energia-0101E0017\hardware\cc3200\libraries\ (this may vary depending on where you installed Energia.)
Launch Energia and create a new project. Copy the code below, add in your authorization token (from the Blynk app) and your WiFi credentials. Make sure you have CC3200LP selected in Tools > Board and the correct port selected in Tools > Serial Port.
Press the "play" button in the Blynk app to deploy your app.
In the serial terminal, you should see the LaunchPad connect to your WiFi network and display the temperature each time the app requests data from the board.
That's it! You now have a customized Android or iOS app communicating with your CC3200 LaunchPad over WiFi from anywhere in the world!