Show battery status of CrowPi L in Raspberry Pi OS
Here's a little app to show the battery status of the CrowPi L in the system tray of the native Raspberry Pi OS:
From a terminal, install python3-pyqt5
sudo apt install python3-pyqt5
Clone this projet (the first time only), go to its directory, make it executable (the first time only), run it and enjoy!
git clone git@github.com:ppyne/crowPi-L_BatteryStatus.git cd crowPi-L_BatteryStatus/ chmod +x ./batteryStatus.py ./batteryStatus.py
There're several problems you need to notice when install this APP.
1.'git clone git@github.com:ppyne/crowPi-L_BatteryStatus.git' returns fatal error:
Please change 'git clone git@github.com:ppyne/crowPi-L_BatteryStatus.git' to
git clone https://github.com/ppyne/crowPi-L_BatteryStatus.git
Then the APP will be installed successfully.
2.'./batteryStatus.py' returns
Please enable I2C interface.
Then the APP will work properly.
Warning: to quit the app properly, you must right click on its icon in the system tray and click the menu "Quit".
Comments
How to achieve automatically open battery monitor at boot-up?
Step1: Modify code in batteryStatus.py
Comment out the following code by adding #
Then add the following code to change the icon image from a relative path to an absolute path: (Notice: Please change 'elecrow' to your user name )
Step 2: Create a .desktop file named 'laptop-battery' and put it in the directory "/ home / elecrow /. config / autostart". The contents of the file are:
Notice: The user name in the path should be changed according to yours
Chris
PS - I love this CrowpiL!! it's exactly what I've been looking for for several years, (since Pi2 days)!
Never mind, the problem went away. I think it had something to do with right clicking the icon, then NOT quitting, but moving the mouse focus away. I will tinker some more..
Chris
I did apt-get update and apt-get upgrade on both my images last night (pi os and whatever you guys are using). Now, I'm getting an IIC error on the battery monitor on both images!
qt5ct: using qt5ct plugin
qt5ct: D-Bus system tray: no
Message: IIC read failed, reread
I checked, and the i2c is turned on...
Additionally, Pi-Panel crashes on startup, and says I've got to be on a CrowPi!
I'm lost here, can anybody help?
It appears Elecrow is using i2c to talk to their hardware, and now their hardware isn't answering.
Process so far:
1. burn new image of elecrow version of Linux, and install. - no change
2. install alternate pi4. - no change
How do I get warranty service on this unit?
If the CrowPi-L stops talking to the battery-monitor/Pi-Panel, try unplugging the battery for a minute. That unstuck something in mine!
Chris
Hello Pierre, When you create a. desktop file, please remember to add the suffix ". desktop".
Then right click the file and enter the required code in the file as text editor.