Dear Forum, I have a Banana Pi M5 and i am trying to find a solution to display some information on a small OLED screen connected in the I2C PINs. I have followed the BPI-M5 wiki page installed the Wiring and RPi.GPIO for Amlogic and still no possibility to see the display connected.
Here are my OS details:
PRETTY_NAME="Armbian 22.08.7 Bullseye"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Here are my questions:
- What dts file you are using?
- What overlay you are using to enable the i2c to be able to read and write through?
- Did someone use Adafruit Blinka with this board? By default armbian-config showed: i2cA and i2cB overlays but there is no registry. I tried to port and create other i2c0 - i2c4 to try to enable it but without any success.
If i run i2cdetect -l
i2c-1 i2c DesignWare HDMI I2C adapter
i2c-0 i2c Meson I2C adapter I2C adapter
if i run i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
if i run gpiodetect
gpiochip0 [periphs-banks] (85 lines)
gpiochip1 [aobus-banks] (15 lines)
If i try to use Adafriut and Blinka example i have this error:
python3 stats.py
Traceback (most recent call last):
File "/pi-app/oled-test/OLED_Stats/stats.py", line 6, in <module>
import board
File "/pi-app/oled-test/.env/lib/python3.9/site-packages/board.py", line 137, in <module>
from adafruit_blinka.board.bananapi.bpim5 import *
File "/pi-app/oled-test/.env/lib/python3.9/site-packages/adafruit_blinka/board/bananapi/bpim5.py", line 12, in <module>
SCL = pin.i2cPorts[0][1]
IndexError: tuple index out of range
Did somebody on this forum manage to connect an OLED to BPI-M5 and make it display some information like, hostname, load, etc?
Thank you very much for your time and help,
KR,
Dino