Moheeb Zara
Created February 19, 2015

Pushing Sensor Data to Octoblu w/ CC3000 Shield

Push sensor data to Octoblu with a Sparkfun/Adafruit CC3000 WiFi Shield and visualizing it on Freeboard!

Full instructions provided583
Pushing Sensor Data to Octoblu w/ CC3000 Shield

Story

Read more

Code

file_13638.txt

C/C++
// Constants
#define SITE_URL      "meshblu.octoblu.com"  
#define UUID          "YOUR DEVICE UUID"
#define TOKEN         "YOUR DEVICE TOKEN"

// Add an extra delay (without extra delay messages send 1 per second.
#define addDelay 0

char ap_ssid[] = "WIFI SSID";                  // SSID of network
char ap_password[] = "PASSWORD";          // Password of network

file_13906.txt

C/C++
Type in a caption
unsigned long time = 0;
int val;
int val2;
String payload;

void loop()
{
  
  //This sends an analog value as the payload
  
val = analogRead(0);
val2 = analogRead(1);

payload = "{\"x\": " + String(val) + ", \"y\": " + String(val2) + "}";

//UUID you want to send this message to. * to broadcast to all listening
String target = "*";


//*******************************************************

Github

Credits

Moheeb Zara
39 projects • 139 followers
Developer Advocate at EMQ Technologies - . Co-founder - South West Maker Festival. Hardware hacker, artist, robots, HeatSync Labs
Contact

Comments

Please log in or sign up to comment.