Open mytechguyri opened 2 years ago
Looks reasonable ... not sure why it doesn't work. Did you figure it out?
PS: Just uploaded a much improved driver.
I had taken a break for a while, but I've got some free time on my hands again, so going to give it another go with the improved driver and see what kind of progress I can make.
Let me know if you have questions / issues. Dave E.
Thank you for putting this driver together btw... works great.... So, in my particular weather station, I've also got a lightning sensor... a Sparkfun AS3935.... and I've got it working on the SPI bus, and driving an interrupt in a stand-alone piece of code as shown here:
And it works as it should.... So, I attempted to copy that routine over to the BCRobotics.py code in a block with the wind and rain sensor interrupt driven events.... seems the most logical place, and the expectation is it would function just like the wind and rain interrupt callbacks... but for some reason... it never does the callback.... I have verified, the GPIO pulls HIGH when the interrupt is triggered.... I can read the GPIO from within the main loop and poll and see that it has gone high... but the callback is NEVER triggered for some reason.... and if I try and call the zaptrig callback in the main loop, it complains "not defined" I'm guessing there's something I'm just not seeing here, and that you, since you wrote the original, might have a better idea what it is that I'm missing.
here are the relevant blocks for the includes that this uses and setup of the SPI interface at the beginning