AutoCalibrate no longer working
Issue #12
resolved
AutoCalibrate did not work with 16MHz Arduino in Version 1.21. It shows a wrong messured Frequency about 1.1Mhz On Version 1.2 it works without Problems.
Comments (5)
-
repo owner -
repo owner - changed status to resolved
fixes
#12→ <<cset a08eeada46f8>>
-
repo owner should fix this issue, but could not test it yet.
-
repo owner fixed another error and successfully tested on an arduino nano.
new version is released. sorry this took so long.
-
repo owner also tested successfully on Arduino Nano 33 IoT
- Log in to comment
I’ll look into it. the fix will likely be to revert to the code from 1.20 and use a different frequency division ratio.
until then, in
bool AS3935MI::calibrateResonanceFrequency(int32_t &frequency)
you can try to use a higher division ratio and recalculate the target appropriately:writeDivisionRatio(AS3935_DR_16);
replaceAS3935_DR_16
withAS3935_DR_32
,AS3935_DR_64
orAS3935_DR_128
int16_t target = 6250;
target should be3125
,1562
or781
forAS3935_DR_32
,AS3935_DR_64
orAS3935_DR_128
, respectively.