Hi,
Whenever my pidog is low on battery and shuts down my sdcard gets corrupted. I have flash the os and install all pidog modules again to get it working.
How do I fix this issue?
Is there a way I can monitor the pidog battery and get an alert at say 10% battery level?
The same sd card os corruption is seen when I power of pi using the switch on hat. If I do a sudo shutdown and then turn it off everything works fine..
Is this expected?
Regards,
Puneeth
Directly cutting off power (including battery depletion) does have a chance of corrupting the system on the SD card, but it shouldn’t happen every time.
Battery Management Suggestions
Avoid using the device until the battery is completely drained.
It is recommended to charge the battery when the power level gets low. You can check the power indicator LEDs on the Robot HAT: when both LEDs are off, it means the battery level is insufficient and needs to be charged.
Thanks for the reply.
Where is the power indicator on hat? Is there a way I can make pidog say that battery is 10% or battery is low please charge or something like that?
Found it!!
But can I write a program to make pidog announce that the battery is low? Any sample codes for the same would be really helpful.
Or is there any way to safe shutdown when battery is low ?
Thanks
But this issue happens every single time. It’s a brand new sd card and pi5 8gb..
You can implement that function yourself. In the robot_hat library, there is a method get_battery_voltage() inside utils.py that reads the battery voltage.
You can find the code here:
1 Like
Let me give it a try.. Thank you so much!