I have a setup where I am using the Time function to get a timestamp that I am using as part of a message payload to send over MQTT.
For example:
timeStr = Time.format(Time.now(), TIME_FORMAT_ISO8601_FULL);
if (client.isConnected())
{
sprintf(publishString,"[{\"device\": %s, \"timestamp\": %s, \"temperature\": %d}]",macAddr.c_str(),timeStr.c_str(),temp);
client.publish("outTopic/temperature", publishString, MQTT::QOS0);
}
If I comment out the use of the Time function, it works fine. If I leave that in, it runs once and then the Argon flashes red and reboots.
I tried a couple of other ntp libraries and saw the same issue.
Any ideas why using time/ntp functions would do this?