Suggested RPi aarch64 Python GPIO library?

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Suggested RPi aarch64 Python GPIO library?

Postby zener » Mon May 20, 2024 7:29 pm

What is the suggested RPi aarch64 Python GPIO library to use and how to set it up?


I tried pip install RPi.GPIO without any success:

[code]
$ uname -a
Linux pi3p2 6.8.9-1-aarch64-ARCH #1 SMP PREEMPT_DYNAMIC Sat May 4 06:41:28 MDT 2024 aarch64 GNU/Linux
$ python3
Python 3.12.3 (main, Apr 27 2024, 16:20:58) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/python/venv/lib/python3.12/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
>>>
$ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3$
[/code]
zener
 
Posts: 3
Joined: Mon May 20, 2024 3:23 pm

Re: Suggested RPi aarch64 Python GPIO library?

Postby solskogen » Tue May 21, 2024 6:40 am

You need to use the linux-rpi kernel instead of mainline.
solskogen
 
Posts: 168
Joined: Mon Nov 18, 2013 10:41 am

Re: Suggested RPi aarch64 Python GPIO library?

Postby zener » Tue May 21, 2024 7:43 pm

Thanks, is there an image or tar file containing the linux-rpi kernel available for download anywhere?
zener
 
Posts: 3
Joined: Mon May 20, 2024 3:23 pm

Re: Suggested RPi aarch64 Python GPIO library?

Postby graysky » Tue May 21, 2024 10:19 pm

Package in the official repos:

pacman -S linux-rpi
graysky
Developer
 
Posts: 1757
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Suggested RPi aarch64 Python GPIO library?

Postby zener » Tue May 28, 2024 4:59 pm

Thanks!
zener
 
Posts: 3
Joined: Mon May 20, 2024 3:23 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 6 guests