-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
Description
Hi!
I am using the GPIO.add_event_detect with GPIO.BOARD setting.
The emulator in the callback gives the channel number instead of the pin number.
The documentation sais it is OK, but on the hardware the default GPIO library gives the pin number in this case!
The old code:
GPIO.add_event_detect(PINS.BUTTON, GPIO.BOTH, callback=waitOnEvent)
which gives the parameter like channel.
I use the folowing workaround:
GPIO.add_event_detect(PINS.BUTTON, GPIO.BOTH, callback=lambda x: waitOnEvent(PINS.BUTTON))
which gives the parameter like pin (PINS.BUTTON)
I dont know it is a problem or not, but definitely a compatible issue...
Regards, Art