While doing research about how to display the battery voltage in the menu for the Raspberry Pi, I initially came across some information that developing plugins for LXPanel was the way to go. However, it seems the Raspberry Pi PIXEL environment is a highly customized version of LXDE and I was unable to find information of how to create a plugin. However, did notice that there is an existing plugin called "System Tray" which is part of the menu by default, so I looked in that direction and came across some python code that uses GTK+ to display an icon in that system tray. In fact the code I came across was for a battery monitor that read some system information about the battery and showed a representation there.
I was able to adapt this code to work with my existing python code that read the MCP3002 instead of the system and now it's working great. I just need to find the best way to run this on startup and it should be finished.
My plan is to take a similar approach for the keypad, except I'll be doing that in C since I'm more comfortable doing low level stuff there. However, if it turns out rewriting my keypad driver in Python is easier, I'll go that route.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.