Created
June 26, 2016 18:09
-
-
Save LindaLawton/2aaf1134c1509aa9d55b0c22e7375de0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Declaring the variables. | |
*/ | |
char MyIp[16] ; | |
char AccountId[20] = "UA-XXX-1"; | |
char cid[10] = "123"; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
char data[1000] ; | |
sprintf(data,"{ \"v\": \"1\",\"tid\": \"%s\",\"cid\": \"%s\", \"t\": \"screenview\",\"cd\": \"Kitchen\",\"an\": \"ParticleTesting\",\"uip\": \"%s\" ,\"cm1\": \"%u\"}" | |
,AccountId | |
,cid | |
,WiFi.localIP().toString().c_str() | |
,1); | |
Particle.publish("ScreenViewHit", data, PRIVATE); | |
delay(10000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment