How to access GPIO pins with Python on an UP4000 running Debian?
torntrousers
New Member Posts: 8 ✭
Hello.
Could anyone help with how to access GPIO pins from Python on an UP4000 running Debian?
Many thanks in advance.
Answers
-
@torntrousers
1. download and install pinctrl-upboard driver , following the link as below
https://github.com/up-division/pinctrl-upboard?tab=readme-ov-file#install-deb-package
2. install python package
$pip3 install python-periphery
3. check /sys/class/gpio has gpiochip0 appear after reboot the system,
then you can using python periphery.GPIO to access HAT pins GPIO as RPi GPIO number. -
Thanks @garyw , thats really helpful