var err = this.r(R.ERROR);
if (err) throw new Error("MFRC522 Request Error "+err);
It's reading the ERROR register, and that is reporting the number 255 - so you'd have to look at the datasheet itself for reasons it's so unhappy.
You could try checking inside getCardSerial - if it doesn't receive the correct bytes it just returns [], so you could print out what it did receive and see if that makes sense
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:
It's reading the ERROR register, and that is reporting the number 255 - so you'd have to look at the datasheet itself for reasons it's so unhappy.
You could try checking inside
getCardSerial
- if it doesn't receive the correct bytes it just returns[]
, so you could print out what it did receive and see if that makes sense