When I flash publishme.ino from the sample library and watch the stream from a terminal using
curl https://api.particle.io/v1/devices/events?access_token=redacted
I see “:ok” and then no text but carriage returns are advancing the cursor. There is nothing in the console window either.
How do I troubleshoot this?
// publishme.ino -- Spark Publishing Example
unsigned long lastTime = 0UL;
char publishString[40];
void setup() {
}
void loop() {
unsigned long now = millis();
//Every 15 seconds publish uptime
if (now-lastTime>15000UL) {
lastTime = now;
// now is in milliseconds
unsigned nowSec = now/1000UL;
unsigned sec = nowSec%60;
unsigned min = (nowSec%3600)/60;
unsigned hours = (nowSec%86400)/3600;
sprintf(publishString,"%u:%u:%u",hours,min,sec);
Spark.publish("Uptime",publishString);
}
}