AS3935 on RPI4 Bullseye
I have installed the necessary software from your AS3935 WIKI site to make the lightning sensor running.
It seems that the library did not install:
pi@lightning:~/DFRobot_AS3935/python/raspberrypi/example/DFRobot_AS3935_ordinary $ python DFRobot_AS3935_ordinary.py
Traceback (most recent call last):
File "DFRobot_AS3935_ordinary.py", line 21, in <module>
from DFRobot_AS3935_Lib import DFRobot_AS3935
ModuleNotFoundError: No module named 'DFRobot_AS3935_Lib'
I could fix it by setting the real path to the DFRobot_AS3935_Lib file. So basically the python script is running.
However now I get the following error:
pi@lightning:~/DFRobot_AS3935/python/raspberrypi/example/DFRobot_AS3935_ordinary $ sudo python DFRobot_AS3935_ordinary.py
init sensor sucess.
set to indoors model
enable disturber detection
Traceback (most recent call last):
File "DFRobot_AS3935_ordinary.py", line 88, in <module>
GPIO.add_event_detect(IRQ_PIN, GPIO.RISING, callback = callback_handle)
RuntimeError: Failed to add edge detection
Any help to this?