Hello guys
I've set my module to use I2C and using following example:
I2C1.setup({scl:22, sda:21,});
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);
var leds = [LED1,LED2,LED3];
if (card=="[147,239,211,128]") digitalWrite(leds,1);
if (card=="[249,192,235,164]") digitalWrite(leds,2);
if (card=="[4,99,129,114,72,52,128]") digitalWrite(leds,4);
});
}, 1000);
And I got I2C errors:
____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|____|___| _|_| |___|_|_|_|___|
|_| espruino.com
2v01 (c) 2018 G.Williams
Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
>
WARNING: Scan stop failed
WARNING: set rssi scan not implemeted yet
WARNING: jshI2CSetup: driver installed, sda: 21 sdl: 22 freq: 1000000,
ERROR: jshI2CWrite:, slave doesn't ACK the transfer.
ERROR: jshI2CRead:, Operation timeout because the bus is busy.
ERROR: jshI2CRead:, Operation timeout because the bus is busy.
{
"chip": "PN51c",
"firmware": "232.254",
"support": 63 }
ERROR: jshI2CWrite:, Operation timeout because the bus is busy.
ERROR: jshI2CRead:, Operation timeout because the bus is busy.
ERROR: jshI2CRead:, Operation timeout because the bus is busy.
Any ideas why basic example does not work? Using ESP32 module.
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.
Hello guys
I've set my module to use I2C and using following example:
And I got I2C errors:
Any ideas why basic example does not work? Using ESP32 module.