Nearly the final code update... for this version
Just pushed what is approaching the final code update for this version to github. Three main areas of change-
- It's neater with better comments - it's been needing a tidy up for a while. There's probably a couple more I can do soon two.
- The watchdog is enabled. With the enabling of pymesh, I've been playing around with what to do if everything goes wrong and it crashes. The watchdog will restart the device after 5 seconds. I've tried consigning the scanning or the network component to a separate thread and it still crashes if it's on wifi then the wifi dies. Now at least the device restarts. I'd love it if I could just restart the pymesh but not there yet - looks like something is getting in the way.
- The tap writes to SD before being added to the transmit queue - this prevents data loss by crash.
On the hardware side, I have a PN532 board coming from Singapore (expecting delivery anytime in the next month). I'm toying with sticking with the current NFC reader or switching to this one. If there is a noticeable difference in read range I'll switch. If not I won't. There isn't a lot of difference in cost when the required voltage boost converters, I2C voltage converters, SD card breakouts etc are taken into account. However, I have found that a pin I though was taken is actually not taken on the pyscan expansion board! Either way I'm starting on my KiCAD learning curve, and therefore a custom PCB isn't far away!
I'm hoping the PN532 isn't too hard to adapt the current NFC reader's python library for....
Post a Comment