CubeCell Board - Maximum timetosleep value

Hello all : I am in doubt here what is the maximum value for the timetosleep #define in the example.
I am making an agriculture device to read soil temperature & humidity, and if possible I would like to read it every hour (60 minutes sleep).

Could be possible to #define timetosleep value as 3.600.000 ? This could works ?

Or if not possible, what is the maximum value to this define in the example ?


Yes that’ll work.

If you’re using LoRaWAN then check out the interrupt example – sleeps for 24 hours (but wakes up if a sensor activates). You don’t need the sensor bit (so just use the normal example), but

uint32_t appTxDutyCycle = (24 * 60 * 60 * 1000); // 24h;

shows you how the daily report-in was implemented. It’s optimised to a constant value at compile time, but showing it like that is clearer to me than counting zeros.

Max value? Well certainly not longer than UINT32_MAX (~49.7 days) but quite possibly shorter due to other limits.