Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3831

Troubleshooting • Failed to add edge detection

$
0
0
Hello,
after updating my CM4(Rasp PI OS Lite (64-bit)) using apt update, upgrade. It passed to work my python script that handled the LoRa module SX127x. I also use the latest version of RPi.GPIO - 0.7.1.
https://github.com/mayeranalytics/pySX127x
I use the:
DIO0 = 22 DIO1 = 23 DIO2 = 24 DIO3 = 25
I can try any other GPIO, but I get the same error every time.

Code:

  GPIO.setup(gpio_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)PORT: 22Traceback (most recent call last):  File "/home/cubeadmin/scripts/lora.py", line 207, in <module>    lora = LoRaRcvCont()           ^^^^^^^^^^^^^  File "/home/cubeadmin/scripts/lora.py", line 47, in __init__    super(LoRaRcvCont, self).__init__(verbose)  File "/home/cubeadmin/scripts/SX127x/LoRa.py", line 95, in __init__    BOARD.add_events(self._dio0, self._dio1, self._dio2, self._dio3, self._dio4, self._dio5)  File "/home/cubeadmin/scripts/SX127x/board_config.py", line 101, in add_events    BOARD.add_event_detect(BOARD.DIO0, callback=cb_dio0)  File "/home/cubeadmin/scripts/SX127x/board_config.py", line 97, in add_event_detect    GPIO.add_event_detect(dio_number, GPIO.RISING, callback=callback)RuntimeError: Failed to add edge detection
I'd be grateful for any advice.
Thank you

Statistics: Posted by DavidJezek — Sun Mar 17, 2024 5:00 pm



Viewing all articles
Browse latest Browse all 3831

Trending Articles