Help with gfx hat code please

Hi all, just joined the pi-volution, got myself a couple of pi 4s, one i have had for a while and its setup as a NAGIOS server to monitor my home network and servers.

The other one i just got for my birthday off my wife, complete with a gfx hat.

I understand basic programming principles, i used to be a C developer, but that is really the only language I know well, I did do a bit of C++ learning but not too much, I understand the concepts of OO programming, however far from being much good at it.

I am looking for a python script that would show the status of the attached pi, such as temperature, IP address, and maybe some pi-hole stats.

I have no idea where to start with this. Does anyone have an example scripts that I might be able to cobble together to get what I am after working.

I tried going to the pimoroni documentation page which doesn’t appear to be working at the minute.

I installed the example scripts and can follow them, however none of them do anything that I want to do so cant quite figure out they might help me. The menu-option one I think will be useful once I get my head around how I am going to achieve what I want.

Any help or guidance would be greatly appreciated.

Welcome to the forum.

First you should head over to github.com and poke around. You’ll find stuff in Python and other languages like C++.

1 Like

Manual install:
Library install for Python 3:
sudo pip3 install gfxhat
Library install for Python 2:
sudo pip2 install gfxhat
Development:
If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository, cd to the library directory, and run:

sudo python3 setup.py install
(or sudo python setup.py install whichever your primary Python environment may be)

In all cases you will have to enable the i2c and spi buses.
I hope this helps!
Developer
apps4rent

1 Like