Power & Source of Big Ideas

RPi.GPIO_NP add_event_detect() broken

Moderators: chensy, FATechsupport

Hello,
i just tried the python library RPi.GPIO_NP.

Adressing the PINs is working:

Code: Select all

while True:
    print("12: {}".format(GPIO.input(12)))
    print("22: {}".format(GPIO.input(22)))
    time.sleep(1)


But getting the interrups, always registering pin number 11 (Linux GPIO 0), instead of given pin number:

Code: Select all

GPIO.add_event_detect(12, GPIO.BOTH, callback=measure, bouncetime=200)
GPIO.add_event_detect(22, GPIO.FALLING, callback = isr, bouncetime = 200)


- Event detection is then only working, if i connect my button to pin 11.
- Both callbacks are then triggered on pin 11.

Code: Select all

root@neo2:~# ls /sys/class/gpio/
export  gpio0  gpiochip0  gpiochip352  unexport
shows that gpio0 is exported

I think it is an issue in the RPi.GPIO_NP library. Can you fix it?

Thanks
Birdie
Hello,

What nanopi image or RPi.GPIO_NP library are you using ?

add_event_detect() is not implemented on provided RPi.GPIO_NP by friendlyarm images. There are numerous posts in this forum about this issue.

For info, you may want to build RPi.GPIO_NP from this repo https://github.com/auto3000/RPi.GPIO_NP.

Good luck.

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 102 on Mon Oct 08, 2018 12:42 pm

Users browsing this forum: No registered users and 3 guests