allatutti Posted April 2 Share Posted April 2 If someone is interested can easy setup OledStats for OrangePi5 and SSD1306 Hardware: Orangepi5 SSD1306 OLED display Software Armbian Jammy KDE Neon 6.1.43 Files attached in ZIP archive device.py PixelOperator.ttf setup.py stats.py How to: 1) add overlay wget https://raw.githubusercontent.com/orangepi-xunlong/linux-orangepi/orange-pi-5.10-rk3588/arch/arm64/boot/dts/rockchip/overlay/rk3588-i2c5-m3.dts sudo armbian-add-overlay rk3588-i2c5-m3.dts reboot 2) connect OLED display to I2C5 M3 Pins SDA + SCL (pins 1(VCC),2(SDA),3(SCL) and 5(GND)) check connection sudo i2cdetect -y 5 must be detected 3c value 3) install needed libs sudo apt-get install i2c-tools python3-smbus python3-pip python3-dev python3-pil 4) download main karabek project git clone https://github.com/karabek/OrangePi-OLED cd OrangePi-OLED rename old setup.py mv setup.py setup_old.py 4) create new setup.py or copy from ZIP archive nano setup.py #!/usr/bin/env python from setuptools import setup setup( name="ssd1306", version="0.1.0", author="Richard Hull", author_email="richard.hull@destructuring-bind.org", description="A small library to drive an OLED device with either SSD1306 or SH1106 chipset", license="MIT", keywords="raspberry pi rpi oled ssd1306 sh1106", url="https://github.com/rm-hull/ssd1306", packages=['oled'], ) 5) Start setup.py sudo python3 setup.py sdist 6) copy generated folders to python3 dist packages sudo cp -r OrangePi-OLED/oled/ /usr/local/lib/python3.10/dist-packages/ sudo cp -r OrangePi-OLED/ssd1306.egg-info/ /usr/local/lib/python3.10/dist-packages/ 7) replace device.py file with file in ZIP archive in dist-packages oled folder cd /usr/local/lib/python3.10/dist-packages/oled mv device.py device_old.py 9) copy stats.py and font file PixelOperator.ttf from ZIP archive start stats.py file sudo python3 stats.py result should be same as on RPI device picture Orangepi5_OLED.zip 0 Quote Link to comment Share on other sites More sharing options...
compent Posted April 3 Share Posted April 3 Very nice and with clearly laid out installation instructions. 0 Quote Link to comment Share on other sites More sharing options...
allatutti Posted April 5 Author Share Posted April 5 OLED stats working also in debian, you need to activate I2C5 M3 overlay in orangepi-config 0 Quote Link to comment Share on other sites More sharing options...
allatutti Posted April 9 Author Share Posted April 9 For older Kernel Linux orangepi5 5.10.160-rockchip-rk3588 you will need to install python3-psutil sudo apt install python3-psutil 0 Quote Link to comment Share on other sites More sharing options...
habro Posted May 19 Share Posted May 19 (edited) "OLED stats working also in debian, you need to activate I2C5 M3 overlay in orangepi-config" By doing above, do you still need to execute point #1 (add overlay) from original instructions? Edited May 19 by habro 0 Quote Link to comment Share on other sites More sharing options...
allatutti Posted May 20 Author Share Posted May 20 (edited) nope with original orangepi debian image you dint need to do point 1. Only go to orangepi-config and enable I2C5 M3 there. Edited May 20 by allatutti 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.