Hi!
I am running the following code on an Arduino Uno (see attached .zip).
I observe a strange behaviour: the board reboots, seemingly at the call of battery_controller_instance.update(); in the setup loop. This is really strange, because I put a print statement just before the call to the function, and immediately at the beginning of the function. The print at the beginning of the function never gets printed. I do not think this is due to the watchdog firing, as I can put a series of prints with 1000ms delays before the call without problem (I tried this), and the watchdog should also not fire before 8s, but reboot happens after a few 100s of ms.
Any idea why this is happening?
I am using Arduino IDE 1.6.13 to compile, on Ubuntu 16.04 (I would prefer not to install new IDEs, I do not want to mess with my installs, I will update at next Ubuntu release).
PowerControl.zip (208 KB)