AutoCalibrate no longer working

Issue #12 resolved
Former user created an issue

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)

  1. Gregor Christandl repo owner

    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); replace AS3935_DR_16 with AS3935_DR_32, AS3935_DR_64 or AS3935_DR_128

    int16_t target = 6250; target should be 3125, 1562 or 781 for AS3935_DR_32, AS3935_DR_64 or AS3935_DR_128, respectively.

  2. Gregor Christandl repo owner

    fixed another error and successfully tested on an arduino nano.

    new version is released. sorry this took so long.

  3. Log in to comment