pull/2/head
ouki-wang 6 years ago
parent 8d6a26ece5
commit 388b799c70
  1. 2
      DFRobot_AS3935_I2C.cpp
  2. 2
      RaspberryPi/Python/DFRobot_AS3935_Lib.py
  3. 2
      RaspberryPi/Python/README.md
  4. 2
      RaspberryPi/Python/example/DFRobot_AS3935_detailed.py
  5. 2
      examples/DFRobot_AS3935_lightning_sensor_detailed/DFRobot_AS3935_lightning_sensor_detailed.ino
  6. 2
      readme.md

@ -272,7 +272,7 @@ void DFRobot_AS3935_I2C::setWatchdogThreshold(uint8_t wdth)
// This function is used to modify WDTH. It is used to increase robustness to disturbers, // This function is used to modify WDTH. It is used to increase robustness to disturbers,
// though will make detection less efficient (see page 19, Fig 20 of datasheet) // though will make detection less efficient (see page 19, Fig 20 of datasheet)
// WDTH register: add 0x01, bits 3:0 // WDTH register: add 0x01, bits 3:0
// default value of 0001 // default value of 0010
// values should only be between 0x00 and 0x0F (0 and 7) // values should only be between 0x00 and 0x0F (0 and 7)
singRegWrite(0x01, 0x0F, (wdth & 0x0F)); singRegWrite(0x01, 0x0F, (wdth & 0x0F));
} }

@ -185,7 +185,7 @@ class DFRobot_AS3935:
#This function is used to read WDTH. It is used to increase robustness to disturbers, #This function is used to read WDTH. It is used to increase robustness to disturbers,
#though will make detection less efficient (see page 19, Fig 20 of datasheet) #though will make detection less efficient (see page 19, Fig 20 of datasheet)
#WDTH register: add 0x01, bits 3:0 #WDTH register: add 0x01, bits 3:0
#default value of 0001 #default value of 0010
#values should only be between 0x00 and 0x0F (0 and 7) #values should only be between 0x00 and 0x0F (0 and 7)
self.singRegRead(0x01) self.singRegRead(0x01)
return self.register[0] & 0x0F return self.register[0] & 0x0F

@ -120,7 +120,7 @@ def getNoiseFloorLv1(self);
/* /*
* @brief Set an anti-interference rating * @brief Set an anti-interference rating
* *
* @param 0~7,More than 7 will use the default value:1 * @param 0~7,More than 7 will use the default value:2
*/ */
def setWatchdogThreshold(self, wdth); def setWatchdogThreshold(self, wdth);

@ -69,7 +69,7 @@ sensor.setNoiseFloorLv1(2)
#noiseLv = sensor.getNoiseFloorLv1() #noiseLv = sensor.getNoiseFloorLv1()
#used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7) #used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7)
sensor.setWatchdogThreshold(1) sensor.setWatchdogThreshold(2)
#wtdgThreshold = sensor.getWatchdogThreshold() #wtdgThreshold = sensor.getWatchdogThreshold()
#used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7) #used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7)

@ -82,7 +82,7 @@ void setup()
//uint8_t noiseLv = lightning0.getNoiseFloorLvl(); //uint8_t noiseLv = lightning0.getNoiseFloorLvl();
//used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7) //used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7)
lightning0.setWatchdogThreshold(1); lightning0.setWatchdogThreshold(2);
//uint8_t wtdgThreshold = lightning0.getWatchdogThreshold(); //uint8_t wtdgThreshold = lightning0.getWatchdogThreshold();
//used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7) //used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7)

@ -160,7 +160,7 @@ uint8_t getNoiseFloorLvl(void);
/* /*
* @brief Set an anti-interference rating * @brief Set an anti-interference rating
* *
* @param 0~7,More than 7 will use the default value:1 * @param 0~7,More than 7 will use the default value:2
*/ */
void setWatchdogThreshold(uint8_t wdth); void setWatchdogThreshold(uint8_t wdth);

Loading…
Cancel
Save