sparkfun / SparkFun_AS3935_Lightning_Detector_Arduino_Library

Other
37 stars 19 forks source link

Disturbers not being masked #17

Closed ojones117 closed 1 year ago

ojones117 commented 3 years ago

Subject of the issue

Getting lots of disturbers on the serial output. Even with mask disturbers being true. Using code revision 1e1a717 Haven't detected any lightning events even with a storm passing by. Wondering if something isn't configured correctly.

Your workbench

Steps to reproduce

Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue. Using "Example2_More_Lightning_Features_SPI

lightning.maskDisturber(true);

Expected behavior

Not see Disturber events on the serial output

Actual behavior

AS3935 Franklin Lightning Detector Schmow-ZoW, Lightning Detector Ready!

Are disturbers being masked: YES Are we set for indoor or outdoor: Indoor. Noise Level is set at: 3 Watchdog Threshold is set to: 2 Spike Rejection is set to: 2 The number of strikes before interrupt is triggerd: 1 Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber. Disturber.

BG7UHS commented 3 years ago

I also encountered the same problem. I don't know if it is due to a wiring error or other errors. I use arduino nano

TadyTheFish commented 1 year ago

I know this is an old issue, but if using the default examples, in the setup function you have lightning.resetSettings(); at the end, you need to comment out that, or it will revert the detector to default settings

edspark commented 1 year ago

Thanks for bringing that to my attention @TadyTheFish, this was fixed in the latest release, 1.4.5.

TadyTheFish commented 1 year ago

No problem. I hit this snag also.. No matter what setting I tried it seemed that they had no effect... Then I tested this with printing the settings of the chip in the loop() and theye were default.. Then I removed the resetSettings and it worked