Menu

#79 RISING and FALLING behave like BOTH

Duplicate
None
High
Defect
2016-02-09
2014-10-18
No

When configuring edge detection using GPIO.add_event_detect(), FALLING and RISING behave like BOTH, i.e. they detect both rising and falling edges. Example code (reproduces the bug with NOOBS 1.3.10/GPIO 0.5.6):

GPIO.setmode(GPIO.BOARD)
GPIO.setup(8, GPIO.IN)
GPIO.add_event_detect(8, GPIO.FALLING, callback=..., bouncetime=100)

This bug is also discussed here: http://www.raspberrypi.org/forums/viewtopic.php?f=32&t=59457

Let me know if I can help and/or provide more info.

Discussion

  • Jörg Zieren

    Jörg Zieren - 2014-10-18

    Can still reproduce with GPIO 0.5.7.

     
  • Jörg Zieren

    Jörg Zieren - 2015-01-10

    Can still reproduce with GPIO 0.5.9. I should also clarify: RISING always behaves like BOTH, while FALLING sometimes does, and sometimes doesn't. It produces "runs" of either effective mode, i.e. for a few seconds it works like BOTH, then for the next few seconds it works correctly.

    This happens on the B and B+. Am I the only one who noticed this?

     
  • Jörg Zieren

    Jörg Zieren - 2015-01-10

    On some forums others have the same problem.

    BTW, it happens both when using add_event_detect and wait_for_edge.

     

    Last edit: Jörg Zieren 2015-04-23
  • Jörg Zieren

    Jörg Zieren - 2015-04-23

    Interestingly, with RPIO this problem does not happen.
    https://pythonhosted.org/RPIO/rpio_py.html

     
  • Adam

    Adam - 2016-01-06

    I actually just put in a ticket for this as well, I'm seeing the same thing on version 0.6.0a3
    https://sourceforge.net/p/raspberry-gpio-python/tickets/121/

     
  • Ben Croston

    Ben Croston - 2016-02-09
    • status: New --> Duplicate
    • assigned_to: Ben Croston
     
  • Ben Croston

    Ben Croston - 2016-02-09

    Merged into issue 121

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.