Unfortunately that doesn't seem to work for me. On Espruino 1.58, the following code example works:
function onInit() {
digitalWrite(LED3,0); //reset blue LED
I2C1.setup({scl:B6, sda:B7});
}
onInit();
var nfc = require("PN532").connect(I2C1);
print(nfc.getVersion());
nfc.SAMConfig(); // start listening
setInterval(function() {
nfc.findCards(function(card) {
print("Found card "+card);
card = JSON.stringify(card);
if (card=="[4,238,254,40,117,69,0]") digitalWrite(LED3,1);
});
}, 1000);
If I unwrap the onInit() function so the I2C1.setup() is run inline at the start, as soon as I type save() the Espruino reboots and I get the I2C errors. And every time it starts up after that.
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.
Unfortunately that doesn't seem to work for me. On Espruino 1.58, the following code example works:
If I unwrap the
onInit()
function so theI2C1.setup()
is run inline at the start, as soon as I typesave()
the Espruino reboots and I get the I2C errors. And every time it starts up after that.It does seem to set it up though: