Jump to content

Recommended Posts

Posted

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
 

Posted
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.

Posted

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

Posted

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.

Posted
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.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines