-->
Page 1 of 1

Reboots when combining Ticker and MQTT client PubSubClient

PostPosted: Sat Apr 11, 2015 1:04 pm
by ToSa
Ticker works fine using the example sketches and the MQTT client works perfectly fine as well. As a very basic example I'm publishing a simple message every 10 seconds to the MQTT broker. Doing so with a loop function like this works perfectly fine:
Code: Select allloop() {
  send();
  delay(10000);
}

but as soon as I try to replace that with a Ticker the module reboots after a few seconds:
Code: Select allTicker sendTicker;

setup() {
  ...
  sendTicker.attach(10.0, send);
}

loop() {
}

and the reason shown for the reboot is wdt_reset. Neither the Ticker nor the MQTT client libraries have an issue with the watchdog separately.

The Ticker approach appears more elegant as the loop could still be used for different purposes...

Re: Reboots when combining Ticker and MQTT client PubSubClie

PostPosted: Sat Apr 11, 2015 4:44 pm
by Toshik
The same here.

Re: Reboots when combining Ticker and MQTT client PubSubClie

PostPosted: Sat Apr 11, 2015 11:14 pm
by igrr
Thanks for reporting, I'll take a look.

Re: Reboots when combining Ticker and MQTT client PubSubClie

PostPosted: Tue Apr 21, 2015 9:01 am
by Toshik
Any news? :)