Skip to content

Instantly share code, notes, and snippets.

@sanfx
Last active April 25, 2020 18:26
Show Gist options
  • Save sanfx/9432b73cb2c5ff141cb907e55cf6c48b to your computer and use it in GitHub Desktop.
Save sanfx/9432b73cb2c5ff141cb907e55cf6c48b to your computer and use it in GitHub Desktop.
snippet
Particle.publish("NTP clock is: ", hhmmss(now.seconds) + "." + String::format("%03i",now.millis));
Particle.publish("System clock is: ", hhmmss(((Time.now() % 86400) / 3600)));
if (isDSTactive()){
Particle.publish("DST Active Hour: ", String::format("%3i", Time.hour()));
}
else{
Particle.publish("DST InActive Hour: ", String::format("%3i", Time.hour()));
}
Particle.publish("Response Status: ", String::format("%3i", response.status));
Particle.publish("Request body: ", response.body);
Particle.publish("Humidity: ", String::format("%.2f", humidity));
Particle.publish("Temperature: ", String::format("%.2f", temperature));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment