Adafruit 240×240 display
So after a bit of success with the previous two Adafruit displays I figured that I’d try their 240×240 display so I ordered one and given the current COVID-19 induced postal delays it eventually arrived.
I wasted no time in disabling the script that runs the 128×64 display and plugging in the new one.
Getting it working with a sample Adafruit script took no time at all so I now had to write another Python3 script to run the bigger display. I worked out roughly what I wanted to put on it and in which orientation. With a decent font size and by tweaking the height and width parameters in the script I found that I had eleven lines to play with.
As ever my Python3 skills are a bit Neanderthal so it took a while and was really, really messy to start with. But at least it worked.
Once I set to work putting a bit of doco in the script and cleaning it up a bit I only needed an hour or so to make it look a bit respectable, to me at least, and to have it still work. It’s here for your perusal if you so desire.
It even looks fairly neat apart from the fan wires that are not connected any more due to the display taking the 5V pins. I’ll have to work out a way of sourcing the 5V from somewhere else although the fans aren’t really needed – the Pi 4 4GB usually runs at less than 60 deg C even when playing HD videos with VLC.
What it displays
After a bit of messing around I have it displaying the date, the time, CPU temp, CPU and memory usage, disk usage, swap usage, uptime, boot time and three lines for button presses, etc. I’ll probably mess around with these lines and the button callbacks some time in the future.
Anyway another success with an Adafruit display. If you have a look at the script that drives it you’ll no doubt see that my Python3 skills are lacking and that I’ve probably gone about everything in the most inefficient way possible.
There are a few bits of the script that I found as code snippets and messed about with to get the results that I wanted, other bits are directly from Adafruit.
For my next trick I want to have a slideshow running and have the buttons set up in such a way that I can switch what I’ve got now to a slideshow and back again. I was think to have both buttons present a sort of menu so that I can Poweroff, Reboot or go with a slideshow. I have absolutely how I’m going to do it yet though.
Stand by for future developments. In the meantime, if you have any suggestions for the script(s) that I’ve already written please let me know.