Hi Michael, GOOD NEWS!!!! Problem fixed. Now Raspberry Pi reboots correctly and starts the Cron job as it should be. All I did was: 1. Reinstalled Pi-OS Bullseye. 2. Reset Cron (I think it was hanging due to improper installation). 3. Reinstalled all of the software again as instructed in the Video. 4. Setup the Cron-job as in the Video and "Boom" it works! Thanks for all your work. Next project is the Pi NAS with a large SSD.
You are a savior to everyone starting with raspberry pis! You answered many questions I had while figuring it out myself with an unknowingly outdated guide. I was sitting on this case for multiple hours and finally got it quick and simple with your excellent guide.
This is a great write up! Everything seems to be working as described except for two issues. The display stays on after shutdown (I understand that gpio 3v3 power stays active and can be put into low power mode through bootloader config), and the display’s top line appears to be having a font issue (could be a faulty display, also mine has yellow for the first row) Otherwise it works as described, works on reboot and after a power cycle and displays the correct info. Thank you so much!
You would think the PI Org would let people know about these issues before saying just update t o the next OS. I've rarely had issues with Windows. Thanks for your work. Truly appreciated cause I had an OLED display from your previous video.
The problem is that they don't really know what their update is going to "break" on everyone else's software. A lot of these types of projects rely on libraries by a number of parties and each has the potential to fail when an update is made. But yes I'd always suggest waiting a while before updating so that all of these bugs and issues are worked out.
Forgive me. I must be a lot older than you are, at least in nerd years. I've had multiple episodes of one Windows revision killing something I wanted to use. This included a $200 flatbed scanner that wasn't three years old. Sorry, but we're Microsoft and we can do what we ***** please. Loud screaming on the Internet sites. I suppose I could have gone back one full version of Windows, with all the patches and revisions, but that would kill the Anti-Virus for which I paid the current price and other software that wanted the current version.
@@uncleedmcnerd6890 typically they are doing things to fix the leaky security, and the issue lies with the device manufacturer having developed poor drivers. I've had same issue before with a quite pricey USB audio interface. You'd think when you buy a device that there is some commitment from the manufacturer to keep it working for some years. Since Windows 7 this has been a lot less of a problem.
Really great, thank you for this! Tried it in Jan 2024 with a Pi Zero W and a 128x32 I2C OLED display. In stats.py I updated the Width and Height variables and commented out a few "draw.text" lines (since it's a two line display). Works perfectly... I have plenty of good reference code to continue my project. Thanks again!
Michael. Thanks so much for this project. I had no issues getting it running. You then kicked off another rabbit hole for me to fall into! I wanted to show cumulative TX/RX data over eth0 and have managed to get this going and onto a 5th line on the screen. This took a slight change of the original font to a new one (called ProggyTiny.ttf). I am still stumbling my way through python to add a few more lines in before I'm happy with it. Thanks again!
Ive followed your instruction and it worked really good for me (iam a noob at pc/sbc and very new to linux in general) the only issue ive got was with the autorun scrips, because i had a other name for my home/pi. After rename it in the file it workes perfect. :D Really easy to follow guide thanks ;)
I've been looking at putting something together on Udemy (or a similar platform). I've just been trying to gauge the level of interest that there might be as there is a significant amount of work involved in putting a course together.
Hi, great tutorial thank you. However I have tried to install on a 2nd pi4 and keep hitting a problem with the wget line (4:02mins) where I get error 400 bad response when waiting at the HTTP after connecting, any idea what causes this ?.
I did that almost a year ago. Now thinking to add a bigger oled display which will display the information of Ethernet connection and speed along with USB data transmission speed.
The commands do work on the Bookwork OS on pi4 in order for the command to go at the end of some of the lines i used --break-system-packages and it works fine...No other issues as yet.
@@ozziearchangel9096 To be honest I havent touch the Pi since and cant find my commands for what i did. Off the top of my head --break-system-packages. Allow pip to modify an EXTERNALLY-MANAGED Python installation. eg pip install xyz --break-system-packages I may of not done it right im still a noob but it did work for me at the time.
This was a very easy tutorial to follow, thanks! I've added a second OLED screen to my PI, and have set up software i2c, and can see my second device using i2cdetect -y 4. I wanted to mod this script to test the new screen. How do I go about modding this script to open on i2c_bus 4 rather than 1?
I'd suggest looking at the Adafruit CircuitPython library for information on using a different i2c_bus. Their previous code allowed it to be changed within the script but now it looks like it is set in the library.
Amazing video. You explained everything very clear so i was able to do it by myself and it works. But one question: After the cpu text on the display there should stand CPU: 1% but there is not the % symbol instead there is LA? How can i fix that?
Hi Michael, it would be great if you could crearte a video on implementing a ST7789 (7 pin or 8 Pin) display to work with both raspberry pi 4 and Pi 5. Thanks
Hola Michael, excelente vídeo, como siempre a la altura, tengo exactamente esta configuración en una Raspberry pi 4B de 8 g con debían 10 y funciona perfectamente, ahora he comprado una Rsspberry pi 5 de 8 g y quiero hacer lo mismo, tienes un código y repositorios para instalarlo en debían 12 bookworm ???
Unfortunately this script doesn't work on Bookworm yet as the libraries and dependencies aren't compatible with it. When they are eventually updated then I'll modify the script to run on it.
Thank you very much for your attention, I hope that when you have the scripts, you can let me know, it is very important for me and my new project, in any case, I follow your channel very closely, thank you again.@@MichaelKlements
It is not specified which version of Raspberry Pi OS this will work with? Lite, Desktop, or Desktop with recommended Software? I tried this on dietpi but ran into an error when it was trying to install something called Blinka
It works with both versions of Raspberry Pi OS Bullseye (Full and Lite). Dietpi is not a version of Raspberry Pi OS, so is probably missing some elements of software required to run it.
got the screeen working but just wont come on after a reboot,followed tutorial exactly cut the pixeloperator and stats to home folder with no joy,have to keep moving em back to oled folder and running cmd to get screen on
The number being displayed is CPU load, not CPU usage in a percentage like the original script had. You can read up on load vs usage here - www.sentinelone.com/blog/linux-cpu-load/
Instead of running it through crontab (which is more often used as a "task planner", if the name is correct, to periodically run scripts, like backups,...), Why not set it up as a service/daemon? Is there anything preventing it that way? I pretty much forgot how it kinda worked, the only time i did this kind of thing was while setting up my octoprint from scratch.
Hello Michael, two years ago I bought your wonderful case for the Raspberry Pi4 and I'm still totally happy with it. Now I got the new Pi5 and unfortunately I'm having problems installing the OLED stats under Bookworm. It is not possible (at least not easily) to install the setup tools and the Adafruit CircuitPython library with pip. I also tried installing your Docker version. Unfortunately, this also fails because the container did not start up. Do you already have an update to the installation routine in the pipeline or is it at least planned? Many thanks and kind regards from Germany... Ingo
It's usually just libraries/dependencies which are either removed or become incompatible with newer software. You probably could still salvage the older method and get it to work, but since Adafruit have also depreciated their old OLED display library it made more sense to just move over to their newer libraries.
hm.. not sure of it's just me but this isn't working in Dec 2024. I get an error: error: externally-managed-environment at sudo pip3 install --upgrade setuptools but I was able to follow a tutorial using a virtual environment that worked. I would love to get this one working though so I'll try again when I get some time
Wonderful, thanks so much Michael - now my screen is working well again! :) Will this same set of commands work on the 64-bit version of RPiOS for when the full version of that is released? Thanks again! :D
That's great Kody. It should do, but we'll just have to wait and see. It's always difficult to tell which packages will and wont work on future releases.
...Hmm....followup....your new stats.py is different than the old one. Is there a place in your new script to specify which I2C bus to use? In my last comment I mentioned I have two I2C buses set up on my Pi...the original one running a power button and a new one running your screen...? In the old script I could specify the bus number I wanted to use on line 57: # Alternatively you can specify an explicit I2C bus number, for example # with the 128x32 display you would use: disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, i2c_bus=4) ...but I see no similar line in your new script? :)
Yes it's different as the libraries required are a bit different. You can set the address on line 25 of the new script - oled = adafruit_ssd1306.SSD1306_I2C(WIDTH, HEIGHT, i2c, addr=0x3C, reset=oled_reset)
@@MichaelKlements Thanks for the reply man! I see where you can set an address, but how do I set the bus in that line? I remember when I got things working with your last script, the address was the same on bus 1 or bus 4, which were the two buses I had set up...the address was listed as '3C' for both buses for the screen. So I would assume I would have to leave the address the same?
@@MichaelKlements Actually....it might be the line before? Could the 'i2c = board.I2C()' line be the one I need? That line seems to use the default bus, but could I maybe fill in '4' for example, in those brackets to have it run on bus 4...?
Is it possible to have a stats display for a kodi (LibreELEC) media center pi or would it require a lot more / different steps then yours (i would connect via putty, to set everything up)?
You should be able to get it running, but it would be a completely different process as the libraries and dependencies are generally different on different operating systems/distributions.
This work for 0.96' OLED with SSD1306 chip but not working on SH1106 with 1.3" OLED Can You make a new video project with SH1106 and RPI booth working ?
Hi Michael, Please make a video on using your case with RPI4 and multiple SSD's as a NAS with RAID .. I'm so confused about the speed limitaions due to USB or due to the different boards that the SSD connects to ... :(
Bookworm has made it compulsory to use pip in a venv which has broken most of the installation processes for the packages and libraries used for this display, it's going to be a while before theses are all updated.
I get error after upgrade setuptools said error pip s dependency resolver does not currently take into account all the the packages that are installed. This behavior is the source of the following dependency conflicts Lanuchpadlib 1.10.13 requires testresources , which is not installed I try sudo apt-get install lanuchpadlib Say error cant find packages What else should i do?
Sadly, all the programs that you load so perfectly, ALL begin well on my Pi 3b and 4b, but always end up erroring out, cant find this or that resource etc. Largely my experience with the Pi products. Wish there was some real class that would just take you step by step, and if I had a problem, be able to point. My command syntax is exactly like yours. The query sees the OLED. Senior electronics tech - Pi baby. Desire to learn but really- WTH (sorry)?
If you share what error and at what stage you get it then I can try help you out. I've really tried to make this tutorial as "step by step" as possible, so you shouldn't get any errors. What OS are you using?
@@MichaelKlements Thank you author! I have a Pi 3b and a Pi 4b. The errors were on the 3b. I'm sure I'm working with an obsolete OS. To save time, I started the same on the 4b, but couldn't find the HDMI mini cable. One thing after another. If I have problems after installing the current available OS for the 4b, then your procedure, I will ask. Thank you for offering - you're aces!
It is quite frustrating that they use micro-HDMI ports on the 4b. Try using Raspberry Pi Imager to flash the latest Raspberry Pi OS Bullseye and you shouldn't have any trouble getting the rest running.
@@MichaelKlements Worked without error (basically). The part where you display the command sudo python3 raspi-blinka.py (edited, found reference to code link) I had to slow motion capture that with my iPhone, because it was a flash before it disappeared. Everything else went without incident. Thanks for putting it out there. That's awesome... Subscribed.
so i got this setup just like in video and i put in my recallbox sd card with a full setup already and it does not work, i ssh into it but apparently recall box ssh is odd and no pi like options, anyone know how to enable this on a Recall Box setup?
Hello, how can I copy the stats.py script and the PixelOperator font to the /home/pi directory with raspberry pi os lite (because there is no desktop...)
The script displays the boot drive's usage, so it your SSD is your boot drive then it should by default, otherwise you'll need to update script to select another drive.
Can you use that display to access terminal? tty or sth? or display something little more functional and programmable? some images/animations etc? I am really curious.
I have an Argon One V3/M.2 NVMe case and I want this screen to work with it. I'm wondering if anyone has 3D printed an enclosure that this display can fit into and will sit on a desk next to the case?
Thank you for this nice tutorial, Michael. Everything is working fine but I notice the CPU usage is 10% less than the percentage reported in my PI task manager. Do you know why? Should I just change the way the info is formated in the stats.py script? Thank you for your advices
Hi Samuel, I've never really looked into or compared this to the task manager's reported figure. Does it remain the same even while at idle? I wonder if this is some sort of delay in reporting or if there is another reason for the difference.
Awesome Michael, thanks! I cannot launch "crontab ~e" however as it comes up with no such file... are you able to help with this? am a newbie using a pi4...
HELP It just give me white and black pixels with what I think is half numbers on the top of the screen. It's a AZ-Delivery screen My display has in order left to right: VDD GND SCK SDA i am unsure if the wiring is wrong with putting them on the pins that are similar. Tried 3.3v and 5v pins I run a Pi 3 B+ Pi os lite with open media vault installed. Would be happy if I got help.
If you're running the exact script from my Github repository then it's likely a hardware issue. Either the wiring isn't correct or you've got a faulty display.
By name do you mean brand of the display? That shouldn't make any difference as long as its the same model I2C display. Make sure you aren't getting any errors during installation as well.
Well, I'd like to use this display with the 64bit version of the Kali Raspberry Pi version. Blinka just isn't following the idea, and tells me it only works on Raspi OS Bullseye, like stated in the video title. Has anyone got an idea on how to run it with the wrong OS?
Michael, is there a way to connect this LCD and use your tutorial if I am already using Pin 5 (SCL) for my safe shutdown and startup button ? thank you.
Unfortunately this is a design limitation that is difficult to work around. You have to use pins 3 and 5 for I2C communication and only pin 5 works for the wake function. The only "easy" way to get this to work is to use your existing button only for startup and then connect the display to the same pins. You'll then need to modify your shutdown script to work on a separate pin and add a second button. There are some other methods people have tried (using diodes etc.) but they're probably a bit more complicated than what you're looking for.
Its to do with the Adafruit BBIO library. Rather than try to fix the errors I've just updated the tutorial to use their latest CircuitPython libraries, which are still being maintained.
hi though this is an outdated guide its all I got I have no idea about a lot of this.. with this guide at 3.45 I get an error on the sudo pip3 install --upgrade setuptools error extwernally-managed-enviroment
@BatBrendo --break-system-packages worked for me and didn't seem to break anything.. no idea what the impact of using it is but at least it got me up and running
Michael, I use a momentary switch to power on and off my raspberry, to do this I use ping 5 and 6. Thinking of add an OLED display to my pi's any ideas?
I'm not sure why hey decided to make the wake pins the same as one of the communication interfaces, this is one of the reaosns why I haven't put power switches onto my case designs. It might still work, you'll just need to have both connected to pin 5, the wake function should be fine, I'm just not sure how you would get the Pi to shutdown.
@@MichaelKlements thank you very much for your reply. Would you be willing to point me in the right direction for that? Is there a link or another tutorial that talks about that somewhere that you know of?
The manufacturer or seller of the display will likely have a tutorial for their display that contains the correct drivers. If you can get basic text to show up then it's pretty easy to just copy the relevant parts of this script across to the new display's script. There isn't really a generic tutorial, each display is going to be different.
I'd probably hold off on upgrading for another few weeks until they've fixed up any bugs etc.. After that it would be beneficial to run the latest version.
@@MichaelKlements I am using debian bullseye. So i played around with the code. What I did was remove the IP address and moved the cpu line up in its place. The thing is the cpu line reads: cpu 1.62 cpu 20%. The 20% is covering up the cpu temp. After moving that up I can read the temp clearly. Im wondering what can i remove in the code to get rid of the 20% part so I can have the IP address back on there
I am still having issue with getting the script to start the OLED Display. I have added the command into crontab as described but when rebooting the pi the OLED Display doesnt work. If however you run the same command python3 /home/pi/OLED_Stats/stats.py from the terminal it works? Any ideas?
Some additionmal information -- pi@raspberrypi:~ $ ls Bookshelf Downloads Pictures Public Templates Desktop Music Pimoroni raspi-blinka.py Videos Documents OLED_Stats PixelOperator.ttf stats.py pi@raspberrypi:~ $ python3 stats.py Traceback (most recent call last): File "/home/pi/stats.py", line 41, in font = ImageFont.truetype('PixelOperator.ttf', 16) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 852, in truetype return freetype(font) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 849, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 209, in __init__ self.font = core.getfont( OSError: unknown file format
It looks like it's having trouble with reading the font. Either try setting it back to use the default font or move the font and script into the home/pi/ directory.
Hello, I am having a bit of a problem. For some reason I cannot get the screen to keep running. I get through everything and oled screen displaying the stats but like in your website, as I close the terminal, the screen stays frozen. I did input the line in crontab already but once I reboot the screen is still frozen with previous data. Only way to keep it working is only leaving the terminal open and manually running the script. I have gone through the steps at least twice without skipping a step and to no avail.
If you run the script in the terminal and then close the terminal it automatically terminates the script that was running, that's why it freezes. Adding an & to the end of the terminal command tells it to continue running in the background. If its not updating when you reboot then there's a probably with your crontab entry. Its either not finding the script or its not running it correctly.
@@MichaelKlements thanks! I will try that. The crontab, I tried both methods of of saving the line of code even made sure of was doing the & with.a space.
@@MichaelKlements hello, I did move the file over to the home directory, and still no luck. I tried redoing the process all over again and still no avail. I have tried moving it to other locations and I just can't get it to work, I have tried your step by step guide slowly and surely, but it just doesn't work for me. It still runs fine when I execute it manually, and I have tried "crontab -e" and "sudo crontab -e". I may have to delete the whole sd card and start from scratch, see if it helps. (There was one time where windows wouldn't update/fix drivers at all, a fresh reinstall of windows actually helped.) If not, I may give up on trying to get this screen to work.
attempted to merge the two together latest error im getting is the INA219 is not defined. Tried adding "from ina219 import INA219" at the top then got a bunch of errors related to no defined default bus address
Just use bullseye. I'm a software developer and the reason many things don't work with newer operating systems is I have no idea it just doesn't you shouldn't care about it either
There are a few different variants, but they're all on my blog and in past videos on my channel - www.the-diy-life.com/raspberry-pi-4-ssd-case-with-stats-display/
Of ALL the HOW-TO on the net which dont work.... Yours worked 1st time with my OLED. Thank you so much. Saved me lots of time. Works a treat
Hi Michael, GOOD NEWS!!!! Problem fixed.
Now Raspberry Pi reboots correctly and starts the Cron job as it should be.
All I did was:
1. Reinstalled Pi-OS Bullseye.
2. Reset Cron (I think it was hanging due to improper installation).
3. Reinstalled all of the software again as instructed in the Video.
4. Setup the Cron-job as in the Video and "Boom" it works!
Thanks for all your work.
Next project is the Pi NAS with a large SSD.
You are a savior to everyone starting with raspberry pis! You answered many questions I had while figuring it out myself with an unknowingly outdated guide. I was sitting on this case for multiple hours and finally got it quick and simple with your excellent guide.
That's great to hear!
This is a great write up! Everything seems to be working as described except for two issues. The display stays on after shutdown (I understand that gpio 3v3 power stays active and can be put into low power mode through bootloader config), and the display’s top line appears to be having a font issue (could be a faulty display, also mine has yellow for the first row) Otherwise it works as described, works on reboot and after a power cycle and displays the correct info. Thank you so much!
Amazing. A tutorial video that is quick, clear and concise. Good work.
Hello Michael! I ordered your SSD + case kit about a week ago! I'm really excited to have this so I can make my first NASPi!!!!
That's great, good luck with your build!
You would think the PI Org would let people know about these issues before saying just update t o the next OS. I've rarely had issues with Windows. Thanks for your work. Truly appreciated cause I had an OLED display from your previous video.
The problem is that they don't really know what their update is going to "break" on everyone else's software. A lot of these types of projects rely on libraries by a number of parties and each has the potential to fail when an update is made.
But yes I'd always suggest waiting a while before updating so that all of these bugs and issues are worked out.
Forgive me. I must be a lot older than you are, at least in nerd years. I've had multiple episodes of one Windows revision killing something I wanted to use. This included a $200 flatbed scanner that wasn't three years old. Sorry, but we're Microsoft and we can do what we ***** please. Loud screaming on the Internet sites. I suppose I could have gone back one full version of Windows, with all the patches and revisions, but that would kill the Anti-Virus for which I paid the current price and other software that wanted the current version.
@@uncleedmcnerd6890 typically they are doing things to fix the leaky security, and the issue lies with the device manufacturer having developed poor drivers. I've had same issue before with a quite pricey USB audio interface. You'd think when you buy a device that there is some commitment from the manufacturer to keep it working for some years. Since Windows 7 this has been a lot less of a problem.
Really great, thank you for this! Tried it in Jan 2024 with a Pi Zero W and a 128x32 I2C OLED display. In stats.py I updated the Width and Height variables and commented out a few "draw.text" lines (since it's a two line display). Works perfectly... I have plenty of good reference code to continue my project. Thanks again!
You and your projecta messed up my saturday workfree mornings. Now i have to try it....
Best tutorial. Everything worked perfectly! Also thanks for the crontab introduction, very helpful.
Just followed step by step and I want to thank you for all your amazing videos, I'm a big fan and will always continue to watch!
Thank you for the feedback, happy to hear it was useful for you!
Michael. Thanks so much for this project. I had no issues getting it running. You then kicked off another rabbit hole for me to fall into! I wanted to show cumulative TX/RX data over eth0 and have managed to get this going and onto a 5th line on the screen. This took a slight change of the original font to a new one (called ProggyTiny.ttf). I am still stumbling my way through python to add a few more lines in before I'm happy with it. Thanks again!
That's great to hear Simon
Michael just completed this upgrade following your video work first time thank you so much :-)
Ive followed your instruction and it worked really good for me (iam a noob at pc/sbc and very new to linux in general) the only issue ive got was with the autorun scrips, because i had a other name for my home/pi. After rename it in the file it workes perfect. :D
Really easy to follow guide thanks ;)
That’s great, thanks for the feedback!
Would you like releasing a basic course on raspberry pi or any iot device related. I think we can learn more from you.
I've been looking at putting something together on Udemy (or a similar platform). I've just been trying to gauge the level of interest that there might be as there is a significant amount of work involved in putting a course together.
Many thanks man, great explanation, I did the steps via ssh and works like a charm ! :)
Great to hear!
Hi, great tutorial thank you. However I have tried to install on a 2nd pi4 and keep hitting a problem with the wget line (4:02mins) where I get error 400 bad response when waiting at the HTTP after connecting, any idea what causes this ?.
I have an familiar problem i get error 404 and i have no idea where the problem is?
Perfect for what I need... THANK YOU!
... and, up and running! Thank you! And the full write-up is excellent! And - the case as well!
Thanks for sharing this video! Very helfull to understand how to easily active the display.
😎
Thanks for the tutorial, simple, informative and much obliged
Hi, can you please make an update video to this on the new raspberry pi5?
Thank you. You made it really easy and understandable.
Absolutely helpful, thank you so much. My display is working perfectly with you help
That's great!
hi sudo pipe 3 install --upgrade setuptools is not working which means its missing
I did that almost a year ago. Now thinking to add a bigger oled display which will display the information of Ethernet connection and speed along with USB data transmission speed.
That sounds great! There are some colour TFT displays available as well.
Thank you so much. You are amazing. I love you.
The commands do work on the Bookwork OS on pi4 in order for the command to go at the end of some of the lines i used --break-system-packages and it works fine...No other issues as yet.
care to explain what you mean, what full command and where do you type it?
@@ozziearchangel9096 To be honest I havent touch the Pi since and cant find my commands for what i did. Off the top of my head --break-system-packages. Allow pip to modify an EXTERNALLY-MANAGED Python installation. eg
pip install xyz --break-system-packages
I may of not done it right im still a noob but it did work for me at the time.
This was a very easy tutorial to follow, thanks!
I've added a second OLED screen to my PI, and have set up software i2c, and can see my second device using i2cdetect -y 4.
I wanted to mod this script to test the new screen. How do I go about modding this script to open on i2c_bus 4 rather than 1?
I'd suggest looking at the Adafruit CircuitPython library for information on using a different i2c_bus. Their previous code allowed it to be changed within the script but now it looks like it is set in the library.
@@MichaelKlements many thanks! I had success going this route. 👍
what does the LA mean next to the cpu stat
Great tutorial, do you plan to adapt your instructions to bookworm? That would be great.
Best regards Pascal
I am working on it, unfortunately almsot all of the libraries don't run on Bookworm and need a workaround so it'll be a while until this script works.
Amazing video. You explained everything very clear so i was able to do it by myself and it works. But one question: After the cpu text on the display there should stand CPU: 1% but there is not the % symbol instead there is LA? How can i fix that?
Work, grateful !
Hi Michael, it would be great if you could crearte a video on implementing a ST7789 (7 pin or 8 Pin) display to work with both raspberry pi 4 and Pi 5. Thanks
Big oof, doesn't work on Pi5 latest update :(
Hola Michael, excelente vídeo, como siempre a la altura, tengo exactamente esta configuración en una Raspberry pi 4B de 8 g con debían 10 y funciona perfectamente, ahora he comprado una Rsspberry pi 5 de 8 g y quiero hacer lo mismo, tienes un código y repositorios para instalarlo en debían 12 bookworm ???
Unfortunately this script doesn't work on Bookworm yet as the libraries and dependencies aren't compatible with it. When they are eventually updated then I'll modify the script to run on it.
Thank you very much for your attention, I hope that when you have the scripts, you can let me know, it is very important for me and my new project, in any case, I follow your channel very closely, thank you again.@@MichaelKlements
Great Video - Thanks
It is not specified which version of Raspberry Pi OS this will work with? Lite, Desktop, or Desktop with recommended Software? I tried this on dietpi but ran into an error when it was trying to install something called Blinka
It works with both versions of Raspberry Pi OS Bullseye (Full and Lite). Dietpi is not a version of Raspberry Pi OS, so is probably missing some elements of software required to run it.
Any chance for a guide on the new bookworm OS?
got the screeen working but just wont come on after a reboot,followed tutorial exactly cut the pixeloperator and stats to home folder with no joy,have to keep moving em back to oled folder and running cmd to get screen on
Thanks for very good explanation.
What does CPU: 0,96LA mean? (that is what I get on my display)
The number being displayed is CPU load, not CPU usage in a percentage like the original script had. You can read up on load vs usage here - www.sentinelone.com/blog/linux-cpu-load/
@@MichaelKlements Thanks Michael.🙂
Am also getting this, how do we get it to show % ?
I am new to this channel, I need to know more about raspberry pi
Instead of running it through crontab (which is more often used as a "task planner", if the name is correct, to periodically run scripts, like backups,...), Why not set it up as a service/daemon? Is there anything preventing it that way?
I pretty much forgot how it kinda worked, the only time i did this kind of thing was while setting up my octoprint from scratch.
Hello Michael, two years ago I bought your wonderful case for the Raspberry Pi4 and I'm still totally happy with it. Now I got the new Pi5 and unfortunately I'm having problems installing the OLED stats under Bookworm. It is not possible (at least not easily) to install the setup tools and the Adafruit CircuitPython library with pip. I also tried installing your Docker version. Unfortunately, this also fails because the container did not start up. Do you already have an update to the installation routine in the pipeline or is it at least planned?
Many thanks and kind regards from Germany...
Ingo
Facing same problem bro .....
I won't ask why they changed it but what exactly did they change?
Thanks for the update. Greatly appreciated!
It's usually just libraries/dependencies which are either removed or become incompatible with newer software. You probably could still salvage the older method and get it to work, but since Adafruit have also depreciated their old OLED display library it made more sense to just move over to their newer libraries.
I need help with the cronab -e command
when ever i type it in, it says that there is no directory called "-e"
what do i do
me too ! did you get it fixed?
hm.. not sure of it's just me but this isn't working in Dec 2024. I get an error: error: externally-managed-environment at sudo pip3 install --upgrade setuptools but I was able to follow a tutorial using a virtual environment that worked. I would love to get this one working though so I'll try again when I get some time
Would it be possible to do multiple pages/screens that cycle every few seconds?
Maybe show stats for 5 seconds than a picture, then stats and so on?
Yes you can add multiple pages to the display script.
@@MichaelKlementsany tip on how to do that?
Which types of standoffs are the ones that the Pi sit on? I wanted to try this for myself
thx worked a treat
Wonderful, thanks so much Michael - now my screen is working well again! :)
Will this same set of commands work on the 64-bit version of RPiOS for when the full version of that is released?
Thanks again! :D
That's great Kody.
It should do, but we'll just have to wait and see. It's always difficult to tell which packages will and wont work on future releases.
...Hmm....followup....your new stats.py is different than the old one. Is there a place in your new script to specify which I2C bus to use? In my last comment I mentioned I have two I2C buses set up on my Pi...the original one running a power button and a new one running your screen...?
In the old script I could specify the bus number I wanted to use on line 57:
# Alternatively you can specify an explicit I2C bus number, for example
# with the 128x32 display you would use:
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, i2c_bus=4)
...but I see no similar line in your new script? :)
Yes it's different as the libraries required are a bit different.
You can set the address on line 25 of the new script - oled = adafruit_ssd1306.SSD1306_I2C(WIDTH, HEIGHT, i2c, addr=0x3C, reset=oled_reset)
@@MichaelKlements Thanks for the reply man! I see where you can set an address, but how do I set the bus in that line? I remember when I got things working with your last script, the address was the same on bus 1 or bus 4, which were the two buses I had set up...the address was listed as '3C' for both buses for the screen. So I would assume I would have to leave the address the same?
@@MichaelKlements Actually....it might be the line before?
Could the 'i2c = board.I2C()' line be the one I need? That line seems to use the default bus, but could I maybe fill in '4' for example, in those brackets to have it run on bus 4...?
For some reason mine won’t open up a clone terminal when I type in that command
Is it possible to have a stats display for a kodi (LibreELEC) media center pi or would it require a lot more / different steps then yours (i would connect via putty, to set everything up)?
You should be able to get it running, but it would be a completely different process as the libraries and dependencies are generally different on different operating systems/distributions.
I followed the video to the letter..but when I restart the display doesn't turn on...why😟
right at the end of tutorial i get errno 121 remote I/O error
This work for 0.96' OLED with SSD1306 chip but not working on SH1106 with 1.3" OLED Can You make a new video project with SH1106 and RPI booth working ?
Hi Michael,
Please make a video on using your case with RPI4 and multiple SSD's as a NAS with RAID ..
I'm so confused about the speed limitaions due to USB or due to the different boards that the SSD connects to ... :(
I've bought a couple of SSDs to try building a NAS, the video will come soon.
@@MichaelKlements you're a legend.. thanks ❤
Great, tks so much, can you update for raspberry pi 5 with raspberry pi OS Bookworm
Bookworm has made it compulsory to use pip in a venv which has broken most of the installation processes for the packages and libraries used for this display, it's going to be a while before theses are all updated.
Works fine, even for a noob like me, thank you very much
I get error after upgrade setuptools said error pip s dependency resolver does not currently take into account all the the packages that are installed. This behavior is the source of the following dependency conflicts
Lanuchpadlib 1.10.13 requires testresources , which is not installed
I try sudo apt-get install lanuchpadlib
Say error cant find packages
What else should i do?
Any chance for an update on Pi 5?
Sadly, all the programs that you load so perfectly, ALL begin well on my Pi 3b and 4b, but always end up erroring out, cant find this or that resource etc. Largely my experience with the Pi products. Wish there was some real class that would just take you step by step, and if I had a problem, be able to point. My command syntax is exactly like yours. The query sees the OLED. Senior electronics tech - Pi baby. Desire to learn but really- WTH (sorry)?
If you share what error and at what stage you get it then I can try help you out. I've really tried to make this tutorial as "step by step" as possible, so you shouldn't get any errors.
What OS are you using?
@@MichaelKlements Thank you author! I have a Pi 3b and a Pi 4b. The errors were on the 3b. I'm sure I'm working with an obsolete OS. To save time, I started the same on the 4b, but couldn't find the HDMI mini cable. One thing after another. If I have problems after installing the current available OS for the 4b, then your procedure, I will ask. Thank you for offering - you're aces!
It is quite frustrating that they use micro-HDMI ports on the 4b. Try using Raspberry Pi Imager to flash the latest Raspberry Pi OS Bullseye and you shouldn't have any trouble getting the rest running.
@@MichaelKlements Worked without error (basically). The part where you display the command
sudo python3 raspi-blinka.py
(edited, found reference to code link) I had to slow motion capture that with my iPhone, because it was a flash before it disappeared. Everything else went without incident. Thanks for putting it out there. That's awesome... Subscribed.
That's great to hear, thanks for the feedback!
so i got this setup just like in video and i put in my recallbox sd card with a full setup already and it does not work, i ssh into it but apparently recall box ssh is odd and no pi like options, anyone know how to enable this on a Recall Box setup?
Hello, how can I copy the stats.py script and the PixelOperator font to the /home/pi directory with raspberry pi os lite (because there is no desktop...)
Awesome project, is there a way to change the disk usage to what is available on my SSD though?
The script displays the boot drive's usage, so it your SSD is your boot drive then it should by default, otherwise you'll need to update script to select another drive.
Can you use that display to access terminal? tty or sth? or display something little more functional and programmable? some images/animations etc? I am really curious.
You can program it to display animations or other text but I'm not aware of any scripts available to access the terminal through it.
hey, i nedd help, im getting OSError: [Errno 121] Remote I/O error
Thank you.
I have an Argon One V3/M.2 NVMe case and I want this screen to work with it. I'm wondering if anyone has 3D printed an enclosure that this display can fit into and will sit on a desk next to the case?
When I try to clone the git directory I'm asked for a username and password. Any ideas on what that's about?
Thank you for this nice tutorial, Michael.
Everything is working fine but I notice the CPU usage is 10% less than the percentage reported in my PI task manager. Do you know why? Should I just change the way the info is formated in the stats.py script?
Thank you for your advices
Hi Samuel,
I've never really looked into or compared this to the task manager's reported figure. Does it remain the same even while at idle? I wonder if this is some sort of delay in reporting or if there is another reason for the difference.
Would there be a way to get this running on Batocera on a Pi?
work good! thanks
Awesome Michael, thanks! I cannot launch "crontab ~e" however as it comes up with no such file... are you able to help with this? am a newbie using a pi4...
HELP
It just give me white and black pixels with what I think is half numbers on the top of the screen.
It's a AZ-Delivery screen
My display has in order left to right:
VDD
GND
SCK
SDA
i am unsure if the wiring is wrong with putting them on the pins that are similar.
Tried 3.3v and 5v pins
I run a Pi 3 B+
Pi os lite with open media vault installed.
Would be happy if I got help.
If you're running the exact script from my Github repository then it's likely a hardware issue. Either the wiring isn't correct or you've got a faulty display.
@@MichaelKlements so does the names not mean anything special?
By name do you mean brand of the display? That shouldn't make any difference as long as its the same model I2C display. Make sure you aren't getting any errors during installation as well.
@@MichaelKlements by names I meant ports: VDD, GND, SCK and SDA
This process doesn't seem to work with Bookworm
Awesome - thank you ;)
Well, I'd like to use this display with the 64bit version of the Kali Raspberry Pi version. Blinka just isn't following the idea, and tells me it only works on Raspi OS Bullseye, like stated in the video title. Has anyone got an idea on how to run it with the wrong OS?
the brightness of the display is low .. i would like a little more brightness. How can i do that . Please help me
The brightness on the display is not adjustable as far as I'm aware.
Michael, is there a way to connect this LCD and use your tutorial if I am already using Pin 5 (SCL) for my safe shutdown and startup button ? thank you.
Unfortunately this is a design limitation that is difficult to work around. You have to use pins 3 and 5 for I2C communication and only pin 5 works for the wake function.
The only "easy" way to get this to work is to use your existing button only for startup and then connect the display to the same pins. You'll then need to modify your shutdown script to work on a separate pin and add a second button.
There are some other methods people have tried (using diodes etc.) but they're probably a bit more complicated than what you're looking for.
Just curious, what is it about the previous demo you did that no longer works on bullseye? Is it to do with the now deprecated adafruit library?
I upgraded from buster to bullseye and the old oled stats display is still working.
Its to do with the Adafruit BBIO library. Rather than try to fix the errors I've just updated the tutorial to use their latest CircuitPython libraries, which are still being maintained.
Could this be done with osmc ?
hi though this is an outdated guide its all I got I have no idea about a lot of this..
with this guide at 3.45 I get an error on the
sudo pip3 install --upgrade setuptools
error extwernally-managed-enviroment
@BatBrendo --break-system-packages worked for me and didn't seem to break anything.. no idea what the impact of using it is but at least it got me up and running
you can replace `apt-get` with `apt`
Thanks Ben A
so when messing in crontab, I can enter the command then however how do I save and exit?
I have the same problem
You r amazing 👏 ❤ 💖 💗 💕
Michael, I use a momentary switch to power on and off my raspberry, to do this I use ping 5 and 6. Thinking of add an OLED display to my pi's any ideas?
I'm not sure why hey decided to make the wake pins the same as one of the communication interfaces, this is one of the reaosns why I haven't put power switches onto my case designs.
It might still work, you'll just need to have both connected to pin 5, the wake function should be fine, I'm just not sure how you would get the Pi to shutdown.
What if I wanted to use a larger 5inch or 10inch display for this data. Can this be done? If so what steps would I need to change?
You'd need to change the libraries in the script to work with the new display's driver.
@@MichaelKlements thank you very much for your reply. Would you be willing to point me in the right direction for that? Is there a link or another tutorial that talks about that somewhere that you know of?
The manufacturer or seller of the display will likely have a tutorial for their display that contains the correct drivers. If you can get basic text to show up then it's pretty easy to just copy the relevant parts of this script across to the new display's script.
There isn't really a generic tutorial, each display is going to be different.
@@MichaelKlements I understand. You're awesome. Thank you for your time.
good day! there are benefit to update to bullseye? it can continue current setting?
I'd probably hold off on upgrading for another few weeks until they've fixed up any bugs etc.. After that it would be beneficial to run the latest version.
Got it working except on the cpu and temp line it is showing another cpu over the temp. So it just looks jumbled up. It reads: cpu 1.21cpu(jumble)
That's strange, what operating system are you running? There is only one called up in the code, so it shouldn't have a second.
@@MichaelKlements I am using debian bullseye. So i played around with the code. What I did was remove the IP address and moved the cpu line up in its place. The thing is the cpu line reads: cpu 1.62 cpu 20%. The 20% is covering up the cpu temp. After moving that up I can read the temp clearly. Im wondering what can i remove in the code to get rid of the 20% part so I can have the IP address back on there
How do you move between two displays? like display1: CPU status, & display2: PiHole status
Just add a loop that runs through two displays with a time delay between each.
@@MichaelKlements Got it 👍
Now I have to look for how to display the PiHole status screen.
Supercool😀👏👏👏👏👍
Thank you
I am still having issue with getting the script to start the OLED Display. I have added the command into crontab as described but when rebooting the pi the OLED Display doesnt work. If however you run the same command python3 /home/pi/OLED_Stats/stats.py from the terminal it works? Any ideas?
Some additionmal information --
pi@raspberrypi:~ $ ls
Bookshelf Downloads Pictures Public Templates
Desktop Music Pimoroni raspi-blinka.py Videos
Documents OLED_Stats PixelOperator.ttf stats.py
pi@raspberrypi:~ $ python3 stats.py
Traceback (most recent call last):
File "/home/pi/stats.py", line 41, in
font = ImageFont.truetype('PixelOperator.ttf', 16)
File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 852, in truetype
return freetype(font)
File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 849, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 209, in __init__
self.font = core.getfont(
OSError: unknown file format
It looks like it's having trouble with reading the font. Either try setting it back to use the default font or move the font and script into the home/pi/ directory.
I had this issue, but I solved it by adding sudo right after the @reboot.
Does anyone know if this would work on ubuntu server?
Hello, I am having a bit of a problem. For some reason I cannot get the screen to keep running. I get through everything and oled screen displaying the stats but like in your website, as I close the terminal, the screen stays frozen. I did input the line in crontab already but once I reboot the screen is still frozen with previous data. Only way to keep it working is only leaving the terminal open and manually running the script. I have gone through the steps at least twice without skipping a step and to no avail.
If you run the script in the terminal and then close the terminal it automatically terminates the script that was running, that's why it freezes. Adding an & to the end of the terminal command tells it to continue running in the background.
If its not updating when you reboot then there's a probably with your crontab entry. Its either not finding the script or its not running it correctly.
@@MichaelKlements thanks! I will try that. The crontab, I tried both methods of of saving the line of code even made sure of was doing the & with.a space.
Try moving the script into the home directory - that is usually also less complicated to get working.
@@MichaelKlements hello, I did move the file over to the home directory, and still no luck. I tried redoing the process all over again and still no avail. I have tried moving it to other locations and I just can't get it to work, I have tried your step by step guide slowly and surely, but it just doesn't work for me. It still runs fine when I execute it manually, and I have tried "crontab -e" and "sudo crontab -e". I may have to delete the whole sd card and start from scratch, see if it helps. (There was one time where windows wouldn't update/fix drivers at all, a fresh reinstall of windows actually helped.) If not, I may give up on trying to get this screen to work.
Can you paste the exact line you're entering into crontab here and I'll have a look at it?
Thanks a lot
Can u use octo print with this?
Yes, this will run in the background on Raspberry Pi OS Lite
if they don’t have the pins can i solder the wires?
It would be better to solder some pins onto it, but you can definitely solder the wires directly as well.
any update needed for the ups backup display?
I'll hopefully manage to try this out this weekend, I'm not sure if the UPS libraries run on OS Bullseye.
@@MichaelKlements not sure as I am running kali at the moment for testing
attempted to merge the two together latest error im getting is the INA219 is not defined. Tried adding "from ina219 import INA219" at the top then got a bunch of errors related to no defined default bus address
This doesn’t work need an updated version
Just use bullseye. I'm a software developer and the reason many things don't work with newer operating systems is I have no idea it just doesn't you shouldn't care about it either
where can i get the enclosure design?
There are a few different variants, but they're all on my blog and in past videos on my channel - www.the-diy-life.com/raspberry-pi-4-ssd-case-with-stats-display/