Jeremie-C / OrangePi.GPIO

RPi.GPIO drop-in replacement library for Orange Pi Boards
MIT License
97 stars 52 forks source link

issue when using add_event_detect #4

Closed xbladen closed 5 years ago

xbladen commented 5 years ago

I have encountered a problem when using GPIO.add_event_detect(channel) on an orangepi zero

As soon as i use this function, the GPIO.input(channel) is random and static The interrupt is working, but i cannot read the input any longer with the actual value, instead i get a constant 0 or a constant 1, but this seems to endependent of the input-state. The PullUp is still active and even the Pin is no output - i just get no actual value. If i skip the add_event_detect i can read the actual value of the pin.

when add_event_detect is not used, there is no entry for this gpio in /sys/class/gpio when add_event_detect is used, there is an entry for this gpio in /sys/class/gpio and value shows the correct pin state - so low driver seems to work...

when add_event_detect is used, a "gpio readall" on a second terminal gives the correct value

linux is the latest armbian-ubuntu image Armbian_5.69_Orangepizero_Ubuntu_bionic_next_4.19.13.img pip list shows i have OPi.GPIO 0.3.6

test.zip

johnx666 commented 5 years ago

Definitely confirmed. Same issue here.

Jeremie-C commented 5 years ago

Hello. You don't use this library. With my library, pip list shows OrangePi.GPIO 0.6.3