OttawaHacker Posted January 28, 2023 Posted January 28, 2023 I finally found an official source code on the download page of OrangePI that has a version of wiring pi with support for the Orange PI 5 - unfortunately that code is not on the github of orangepi yet. What would be the best way to get this code and the gpio tool into armbian? Build a PPA and package for that one? I don't mind forking their repo and adding the mods but I'm not familiar with generating debian packages. 0 Quote
jimmm Posted January 29, 2023 Posted January 29, 2023 I am also looking for gpio control for orange pi 5 /python can any one help thanks jim p 0 Quote
OttawaHacker Posted January 29, 2023 Author Posted January 29, 2023 3 hours ago, jimmm said: I am also looking for gpio control for orange pi 5 /python can any one help You'll find them on this link Official Tool - Google Drive - this link is in the section "Official tools" from the orangepi.org / Download I'm would like to make them a package so that they can be installed more easily. 0 Quote
jimmm Posted January 30, 2023 Posted January 30, 2023 thanks very much. My skill set as a programmer is limited so I would need some guidance on installation, code samples are very helpful. Jim Peterson 0 Quote
OttawaHacker Posted January 31, 2023 Author Posted January 31, 2023 6 hours ago, jimmm said: My skill set as a programmer is limited so I would need some guidance on installation, code samples are very helpful. In that case, I'd recommend a raspberry pi board or arduino for getting familiar with GPIO - the Orange Pi 5 is pretty much bleeding edge, and all the GPIO stuff is rather experimental. Probably going to be different in few months but right now the GPIO support is quite limited. Also most of the GPIO tools were designed originally for the RPi board. 0 Quote
jimmm Posted February 1, 2023 Posted February 1, 2023 I am competent with raspberry pi 4 gpio my request is for the gpio library that works with orange pi and the syntax that is used thanks again jim p 0 Quote
martivo Posted February 2, 2023 Posted February 2, 2023 I have noy yet played aroud with GPIO on the Banan Pi 5, but for the Banan PI Zero I gave up on trying to use a working Python library and resorted to using the command line tools to get some basic functionality. I ended up calling the commands from Python code. import os stream = os.popen('gpio mode <PIN> input') stream = os.popen('gpio read <PIN>') output = stream.read() print(output) I can see that Banan Pi 5 has also gpiodetect, gpiofind, gpioget, gpioinfo, gpiomon, gpioset commands, so probably something like this might work. root@loovsys:~# gpiodetect gpiochip0 [gpio0] (32 lines) gpiochip1 [gpio1] (32 lines) gpiochip2 [gpio2] (32 lines) gpiochip3 [gpio3] (32 lines) gpiochip4 [gpio4] (32 lines) gpiochip5 [rk806-gpio] (3 lines) root@loovsys:~# gpioget gpiochip0 2 1 root@loovsys:~# gpioget gpiochip0 3 0 I hope this will give some ideas to the direction that you can explore and report back how it goes. 0 Quote
OttawaHacker Posted February 2, 2023 Author Posted February 2, 2023 (edited) 14 minutes ago, JiM022 said: What about this repo? This repo is missing the support for OPI 5. You have to download the code from the link I posted above to get the GPIO working. I started working on a ppa repo and cloning their repo but did not finish that stuff yet... not too familiar with the debian packaging system Edited February 2, 2023 by OttawaHacker 0 Quote
OttawaHacker Posted February 2, 2023 Author Posted February 2, 2023 17 hours ago, jimmm said: I am competent with raspberry pi 4 gpio my request is for the gpio library that works with orange pi and the syntax that is used Btw the library above is the same as the RPI4 one... All the GPIO tools seem to be forks of the rpi ones. 0 Quote
SvOlli Posted February 13, 2023 Posted February 13, 2023 Here's a quick and dirty way to get the deb packages: Step 1: install debhelper sudo apt-get install debhelper Step 2: get the wiringOP source code from the google drive and unpack it Step 3: unfortunately, the source code needs two fixes in debian/wiringpi.install remove the following lines: debian/tmp/usr/man usr/share README.TXT usr/share/doc/wiringpi in devLib/Makefile change the following line: INCLUDE = -I. to INCLUDE = -I. -I../wiringPi Step 4: build the binary packages: from within the "wiringOP" folder run dpkg-buildpackage -b This will give you the following files in the ".." folder: libwiringpi2_2.26~iwj_arm64.deb libwiringpi-dev_2.26~iwj_arm64.deb wiringpi_2.26~iwj_arm64.deb Step 5: install those using dpkg dpkg -i libwiringpi2_2.26~iwj_arm64.deb libwiringpi-dev_2.26~iwj_arm64.deb wiringpi_2.26~iwj_arm64.deb This is a quick hack to get you the packages you need. With python I can't help you, since it lacks the debian folder and Python and me are not on friendly terms. 😉 Also: I did not test, if the packages works in any way. And the way the packages are built is definitely not for distribution, as they lack the proper cleanroom build. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.