Hi, love your MYSbootloader/Controller effort,
My sensors reports every 2 minutes, using "smartSleep", marked it as running on battery, and I can indeed download new firmware, great. I see my data and a heartbeat in MYScontroller every 2 minutes
This works very good (but only after adding the famous both 0.1 and 10 uF capacitors to the NRF)
But the "smartSleep" adds 0.5 second radio/MCU on time and that is killing the battery :
(0.5 sec * 20mA * 30 times per hour /3600)24365 = 730mAh right ?
So if I am correct, that .5 second every 2 minutes alone will empty an AA battery in 1 year
So as alternative :
I report every 2 minutes and then a "sleep", but every 30 times = 1 hour, I throw in a "smartSleep" and not a "sleep". I see my data every 2 minutes and I see a heartbeat every 30 times = 1 hour
I don't mind if it can take 1 hour, but I don't want to manually reset/power cycle, as the sensors are on difficult places so battery exchange and reset should be limited :-)
Problem :
But when I request a firmware download, it does not start on the "smartSleep"/heartbeat
Perhaps you ignore the firmware download when you have seen a "sleep" or it takes too long or ??
I did not manage to find the source of the MYSController, did you make that available ?
In a test I lowered the sleep time to 10 seconds, so 5 minutes for a heartbeat , same problem.
Reset and power cycle do start a download, so no major issues there.
Can you change is so that it will start the download on any first "smartSleep" for below ( battery saving script)? Lets say even if 24 hours :-)
void loop()
{
BatteryVoltage = readVcc() * BatteryCorrection ; // readVcc returns a long type
send(msgBatt.set (BatteryVoltage, 2));
if (count == 0)
{
smartSleep(SleepTime);
}
else
{
sleep(SleepTime);
}
count = (count + 1) % 30;
}