Open NetForces opened 1 month ago
Hi @NetForces
we are not aware of any issues with reboots when using the arduino-ble-gadget library. Depending on your setup and the sensor used, it might be that the power supply is not sufficient. Which sensor do you have connected?
Best, Léonie
It's the SCD-41.
I will revalidate, but if I remove the part of my code that does the light sleep, the sporadic reboots go away. Unfortunately, light sleep is required in my application as it runs off a small battery.
As you write that you are running from a small battery, please note that the SCD41 draws up to 200mA during measurement.
Let us know how it goes and we are happy to help if you have further questions regarding the sensor.
I doubt that it’s the power draw because without adding the arduino-ble-gadget library it is 100% stable. I know bluetooth will draw a little more current, but not that much. The battery powering my design is a 200mAh, and I'm running the SCD-41 in low power mode.
The SCD41 peak power during measurement is 200mA, the low power mode just does the measurement less often and puts the sensor to sleep in between the measurements.
We have not worked with the light sleep mode on Arduino so I do not have any experience with it, but if you wake the board up and do the measurement I could imagine that the battery voltage could drop due to the power draw from startup and measurement. To see what is happening it would make sense to measure the voltage.
I have been having sporadic reboots when using this. It might have to do with the fact that my device sleeps, but I am not sure.
When a reboot occurs, I get the following in the console:
I will attempt to provide the minimal code to reproduce this situation in the next couple of days but if anyone had this issue and know a fix it would be appreciated.