From ee544ff7567137b44e143942e0016fcbbc0a5613 Mon Sep 17 00:00:00 2001 From: ouki-wang <358023925@qq.com> Date: Fri, 16 Nov 2018 10:35:19 +0800 Subject: [PATCH] raspberry V0.3 --- RaspberryPi/Python/DFRobot_AS3935_Lib.py | 4 ++-- RaspberryPi/Python/example/DFRobot_AS3935_detailed.py | 1 + RaspberryPi/Python/example/DFRobot_AS3935_ordinary.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RaspberryPi/Python/DFRobot_AS3935_Lib.py b/RaspberryPi/Python/DFRobot_AS3935_Lib.py index 2217daa..70aafb9 100644 --- a/RaspberryPi/Python/DFRobot_AS3935_Lib.py +++ b/RaspberryPi/Python/DFRobot_AS3935_Lib.py @@ -77,9 +77,9 @@ class DFRobot_AS3935: newRegData = (self.register[0] & ~dataMask)|(regData & dataMask) #finally, write the data to the register self.writeByte(regAdd, newRegData) - print('wrt: %02x'%newRegData) + #print('wrt: %02x'%newRegData) self.singRegRead(regAdd) - print('Act: %02x'%self.register[0]) + #print('Act: %02x'%self.register[0]) def singRegRead(self,regAdd): self.readData(regAdd) diff --git a/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py b/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py index 5f00d73..918b4cb 100644 --- a/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py +++ b/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py @@ -97,6 +97,7 @@ def callback_handle(channel): GPIO.setup(IRQ_PIN, GPIO.IN) #Set the interrupt pin, the interrupt function, rising along the trigger GPIO.add_event_detect(IRQ_PIN, GPIO.RISING, callback = callback_handle) +print("start lightning detect.") while True: time.sleep(1.0) diff --git a/RaspberryPi/Python/example/DFRobot_AS3935_ordinary.py b/RaspberryPi/Python/example/DFRobot_AS3935_ordinary.py index 628ef22..1a89c7b 100644 --- a/RaspberryPi/Python/example/DFRobot_AS3935_ordinary.py +++ b/RaspberryPi/Python/example/DFRobot_AS3935_ordinary.py @@ -77,6 +77,7 @@ def callback_handle(channel): GPIO.setup(IRQ_PIN, GPIO.IN) #Set the interrupt pin, the interrupt function, rising along the trigger GPIO.add_event_detect(IRQ_PIN, GPIO.RISING, callback = callback_handle) +print("start lightning detect.") while True: time.sleep(1.0)