I’m trying to run Example2_More_Lightning_features running correctly with a NodeMCU style ESP8266 connecting via SPI to the Qwiic AS3935 Lightning Detector (SPX-15057) and am getting incorrect output.
I’m using pins (MISO = GPIO12/D6, MOSI = GPIO13/D7, SCLK = GPIO14/D5) and lightningInt = D2 and spiCS = D8.
When I run the example code I’m getting weird output:
AS3935 Franklin Lightning Detector
Schmow-ZoW, Lightning Detector Ready!
Are disturbers being masked: YES
Are we set for indoor or outdoor: 11111
Noise Level is set at: 7
Watchdog Threshold is set to: 15
Spike Rejection is set to: 15
The number of strikes before interrupt is triggerd: 16
Those values don’t make sense because I’ve set maskDisturber(false), OUTDOOR mode, noise=2, lightingThresh=1.
I’m using the current version of the Sparkfun_AS3935 library. This appears to me to be something like a word length of byte order issue, but I don’t know why.
Can anyone confirm that this library does actually work with an ESP8266? I see mention of ESP32 in the code so it appears there were attempts to make it work.