fourstix / Sparkfun_CircuitPython_QwiicAS3935

CircuitPython library for the Sparkfun Qwiic AS3935 Lightning Detector
MIT License
2 stars 6 forks source link

On Raspberry Pi AS3935 CS cannot be linked to board.CE0 #5

Closed tvoverbeek closed 2 years ago

tvoverbeek commented 4 years ago

Because of the special read protocol (CS has to go HIGH-LOW-HIGH at the end of a read, lines 638-642 in sparkfun_qwiicas3935.py) the normal SPI0.0 CS of the PIi (board.CE0) cannot be used. You have to use a normal GPIO for the AS3935 CS. I used GPIO25, board.D25 (which is just above CE0 on the 40-pin connector). Then it works on the Pi.

fourstix commented 2 years ago

Interesting. D25 isn't available on the Sparkfun Pi Hat, so I'll set it up on D20. The CS can be any unused GPIO pin.