adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
438 stars 328 forks source link

Is the Rock 4SE not supported? #778

Closed A-Little-on-the-Nose closed 4 months ago

A-Little-on-the-Nose commented 5 months ago

Hello, I am trying to use the adafruit-blanka and adafruit-trellis library for my Rock 4 SE, but there seems to be an error with libgpiod.

Traceback (most recent call last): File "main.py", line 1, in import start_window File "/home/.../Launchpad/start_window.py", line 3, in from settings_window import settings_window File "/home/.../Launchpad/settings_window.py", line 2, in import one_trellis_window File "/home/.../Launchpad/one_trellis_window.py", line 6, in import board File "/home/.../.local/lib/python3.8/site-packages/board.py", line 269, in from adafruit_blinka.board.radxa.rockpi4 import * File "/home/.../.local/lib/python3.8/site-packages/adafruit_blinka/board/radxa/rockpi4.py", line 7, in from adafruit_blinka.microcontroller.rockchip.rk3399 import pin File "/home/.../.local/lib/python3.8/site-packages/adafruit_blinka/microcontroller/rockchip/rk3399/pin.py", line 7, in from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin File "/home/.../.local/lib/python3.8/site-packages/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py", line 8, in raise ImportError( ImportError: libgpiod Python bindings not found, please install and try again! See https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/main/libgpiod.py

makermelissa commented 5 months ago

It doesn't look like the Rock 4 SE has been added (See https://circuitpython.org/blinka?q=Rock). However, the error indicates that libgpiod python bindings haven't been installed. You could try sudo apt install python3-libgpiod or pip install gpiod and see if it works after that.

A-Little-on-the-Nose commented 5 months ago

The thing that helped was to undo the changes of the pin.py to an older version. But could it be that I can us this library only in combination with trellis plus rock pi and not with trellis->arduino->rock 4SE?

makermelissa commented 4 months ago

If you would like to add support for the Rock 4 SE by modifying the pin file without breaking whichever board you are updating, that would be helpful. I'm not sure exactly what you are trying to do, but with this library, you should be able to interact with the trellis directly. It's basically a combination of using the keypad module and neopixels. I mean, it's theoretically possible to do it with using the arduino as a translation layer, but it sounds pretty advanced.

makermelissa commented 4 months ago

Fixed by #791.