BiffoBear/CircuitPython_AS3935

Code doesn't work with latest Circuit Python

Opened this issue · 0 comments

I've found some bugs in the latest release. It seems that the code in the repo differs from what the latest release has... and if I'm reading this correctly it doesn't seem to be for 8.X version of Circuit Python. It has some very basic errors trying to use the constants (since they're declared in one class and being referenced from a self.XX where self is a different class)

So, I'm wondering if this has been tested recently (with the latest CircuitPython) and if you could point me towards which version of the .py files I should be working from.

I've tried 2 different boards, checked the wiring multiple times on each, and always get this stack trace:

Traceback (most recent call last):
File "code.py", line 21, in
File "/lib/biffobear_as3935.py", line 548, in init
File "/lib/biffobear_as3935.py", line 135, in init
File "/lib/biffobear_as3935.py", line 488, in _startup_checks
File "/lib/biffobear_as3935.py", line 456, in calibrate_clocks
File "/lib/biffobear_as3935.py", line 443, in _check_clock_calibration
OSError: Problem communicating with the sensor. Check your wiring.

I'm just using the basic example. My Interrupt Pin is D21 and CS is D20.
I also noted that there are two different SPI start functions I could use, either one in board or one in busio.

Thanks!