Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orange Pi Zero Plus (V1) GPIO

Featured Replies

I'm using the Orange Pi Zero Plus for a WiFi radio application and need to operate some LED's / Pots etc

Ive previously used an Orange Pi Zero (Regular) and had no problem using pyA20 library or wiringpi

With the Pi Zero Plus, using pyA20 gives me this error for any port:

AttributeError: module 'pyA20.gpio.port' has no attribute 'PA0'

or using wiringpi (gpio readall) gives me:

Oops: Unable to determine board revision from /proc/cpuinfo
-> No "Hardware" line
->  You'd best google the error to find out why.

Any suggestions appreciated,

Thanks

Andy
 

6 minutes ago, Andy West said:

Ive previously used an Orange Pi Zero (Regular) and had no problem using pyA20 library

pin definition must match, otherwise errors are expected...  In case you want to stick to pyA20 you can write a proper mapping for pyGPIO (pyA20 but with multiple boards supported). I never tried it with a H5 board, so I can't say if this will work. 

https://github.com/chwe17/pyGPIO/blob/master/pyGPIO/gpio/mapping/template24.h 

 

or you switch to ArmbianIO from @Larry Bank (https://github.com/bitbank2/ArmbianIO) but I don't know if he supports the Zero Plus, or you give @sgjavas UserSpaceIO a try https://github.com/sgjava/userspaceio. But I don't know if and how well your board is supported by them.

  • Author

Thanks for the reply,

 

I origionally stayed away from armbianIO as I was unable to switch between input and output during the running of my python program

User Space IO uses libgpiod for GPIO stuff and is built from source. The mapping is a bit different than sysfs (the old way of doing GPIO), but pretty straight forward. Each GPIO chip starts at pin 0. It should work with any mainline kernel that supports user space mapping of GPIO, SPI, I2C, PWM and MMIO.

7 hours ago, Andy West said:

Just managed to find this with an updated mapping for H5

 

https://github.com/herzig/orangepi_PC_gpio_pyH5

I think it wouldn't be much effort to implement it into pyGPIO but since I don't have any H5 board, I did this once for a board I didn't own, and if something goes wrong it's a nightmare in case no boardowner is able and willing to debug it. That's why pyGPIO doesn't get that much attention at the moment. ArmbianIO is for sure more maintained than pyGPIO, and I might have a look into UserspaceIO soon. :) 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.