So please excuse my stupid question and be gentle. I am but a lowly sales puke learning Particle.
So I am taking this example and want to instead of printing to a serial port, send as the data in a Particle Publish command.
What is the correct syntax or the easiest way to do this?
void loop()
{
//Get readings from all sensors
getWeather();
/*This math looks at the current time vs the last time a publish happened
if(millis() - lastPrint > 5000) //Publishes every 5000 milliseconds, or 5 seconds
{
// Record when you published
lastPrint = millis();
// Use the printInfo() function to print data out to Serial
printInfo();
*/
Particle.publish("Weather", getWeather(), 60, PRIVATE);
}
}