In fact further testing showed that in my example which works, if I press the reset button it continues to work. But as soon as I cut the power and reapply, it fails. If I execute nfc.SAMConfig again, it will start working.
So the only way I've got it to work 100% is to run it all in onInit()
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In fact further testing showed that in my example which works, if I press the reset button it continues to work. But as soon as I cut the power and reapply, it fails. If I execute
nfc.SAMConfig
again, it will start working.So the only way I've got it to work 100% is to run it all in onInit()