RFID / NFC support - again
Hello,
two years ago, I got this friendly help regarding RFID NFC support:
https://bitbucket.org/john_maloney/smallvm/issues/34/rfid-nfc-support
Today, I was trying to restart the project. Sadly, this was unsuccessful. I got the error: “I2C value must be between 0 and 255”
I looked a little deeper. The error could be traced to the “_PN532sendCommand ‘cmd’” and from there to the command “i2c device ‘hex 24’ write list ‘send’”. I’m guessing that there is something wrong with the list “send”. If I look up the entries of “send” and use a new list with the same entries, I get another result.
Feel free to ask for further details. Any help would be welcome.
Greetings
Comments (4)
-
repo owner -
reporter - changed status to resolved
That did the job.
-> It would be nice, if someone could fix this in the Comm block "i2c device A write list B”.
Thank you for your quick and helpful response. Keep up your work. Greetings to the Microblocks & "Snap!" ... community.
-
repo owner That block is intended to take a list of integers (hence the word "list" in the block name :-)) or a byte array. But I agree, it might be sometimes be handy to be able to pass a string to it, so I've added a case for that. That change will be in the next pilot release, which should out by the end of this week. (This code is in the virtual machine, so you'll need to update the firmware using the upcoming Pilot release to see the change.)
-
reporter OK, the word “list” speaks for itself. :) The Comm block "i2c device A write list B” does it’s job. So, it’s the block “_PN532sendCommand ‘cmd’” from the library “RFID (PN532)” that needs to be changed, if I’m not mistaken.
Anyway, thanks for the support.
- Log in to comment
Sorry it stopped working. Are you passing a string to _PN532sendCommand? If so, you might try forcing it to be a byte array with this block:
If that doesn't work, please post the simplest possible script that give the error and I'll take a look.