How to access GPIO pins with Python on an UP4000 running Debian?
Options
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
Categories
- All Categories
- 63 Announcements & News
- 49 Product News - New Product/Product Change Notice/ End-of-life
- 96 Welcome Developers!
- 46 Unboxing & Project Sharing
- 22 Tech Updates
- 3.4K UP Products
- 17 UP 7000
- 1 UP Squared i12
- 11 UP Xtreme i12
- 13 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 23 UP Squared V2
- 65 UP 4000
- 23 UP Xtreme i11
- 34 UP Squared 6000
- 56 UP Squared Pro
- 136 UP Xtreme
- 820 UP Squared
- 1.4K UP Board
- 74 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 40 UP AI Edge
- 264 Starter Kits & Peripheral