Things used in this project

Hardware components:
Cc3200 launchxl cc3200 launchxl no bg resize
TI LaunchPad CC3200-LAUNCHXL SimpleLink Wi-Fi LaunchPad
Software apps and online services:
Blynk logo avatars
Hand tools and fabrication machines:


Blynk example code for the CC3200. Make sure you update with your Auth Token and WiFi credentials.
 * Blynk is a platform with iOS and Android apps to control
 * Arduino, Raspberry Pi and the likes over the Internet.
 * You can easily build graphic interfaces for all your
 * projects by simply dragging and dropping widgets.
 *   Downloads, docs, tutorials:
 *   Blynk community:  
 *   Social networks:  
 * Blynk library is licensed under MIT license
 * This example code is in public domain.
 * This example shows how to use TI CC3200-LaunchXL
 * to connect your project to Blynk.
 * Feel free to apply it to any other example. It's simple!

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include <WiFi.h>
#include <BlynkSimpleTI_CC3200_LaunchXL.h>
#include <Wire.h>
#include "Adafruit_TMP006.h"
#include <BMA222.h>

// Sensor objects
BMA222 mySensor;
Adafruit_TMP006 tmp006(0x41);

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).

// Your WiFi credentials
char ssid[] = "YOUR SSID HERE";
char pass[] = "YOUR WIFI PASSWORD HERE";        // Set to "" for open networks
int dataX = 0;
int dataY = 0;
int dataZ = 0;

void setup()
  //Open a serial terminal with the PC
  //Set up a blynk connection with your WiFi credentials
  Blynk.begin(auth, ssid, pass);  

  //Accel. setup
  //TMP006 setup
  //Setup RED LED to be an output
  pinMode(RED_LED, OUTPUT);
  digitalWrite(RED_LED, LOW);

// Virtual Pin 1 - Toggles the LED high or low depending on the mobile app input
  //Print to the terminal
  BLYNK_LOG("Got a value: %s", param.asStr());
  //save teh value fromt he app to the variable i
  //if i=1, turn the LED on
  //if i=0, turn the LED off
  int i = param.asInt(); 
  if(i == 1)
    digitalWrite(RED_LED, HIGH);
  else if(i == 0)
    digitalWrite(RED_LED, LOW);

//Virtual pin 5 - Read the TMP006 value when called by the app
  float objt = tmp006.readObjTempC();
  Serial.print("Object Temperature: "); 
  Blynk.virtualWrite(V5, (int)objt);

// Virtual Pin 6
// When virtual pin 6 is requested by the mobile app, we
// will also send data for pins 7 and 8 so all 3 graphs
// are updated
  //Send X axis data
  dataX = mySensor.readXData();
  //Send Y axis data
  dataY = mySensor.readYData();
  //Send Z axis data
  dataZ = mySensor.readZData();

// The main loop listens for commands from the mobile app
void loop()


Daniel Oglvie

Launchpad Engineer at Texas Instruments


Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

Losant with Seeed Studio Grove on MSP432
  • 283
  • 5

Full instructions

Demonstrate an IoT application connecting Seeed Studio Grove Starter Kit sensors to the Losant IoT cloud platform.

  • 374
  • 1

Full instructions

In this article we will introduce you to controlling real world devices using the Blynk system.

Hackster Live April 2017 Workshop - Optional - Easy Add-on
  • 499
  • 4

Full instructions

Adapt your home automation project from our March 2017 workshop to be controlled through BLE using the Blynk app on your phone.

Save your life with the Building Collapse Monitor
  • 909
  • 11

Full instructions

Analyse concrete, metal, wood structures for bends and angles and alerts if they have deviated from the original position.

MyWeatherstation for indoor & outdoor use
  • 447
  • 4

Full instructions

Check the current conditions: light, temperature, humidity on your smartphone.

MyPIR-Sensor activate analog RGB Stripe controlled by Photon
  • 309
  • 3

Full instructions

At my age you have to get up at night and get tired on the way to the bathroom. Using a PIR-Sensor to trigger light on!

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project