RFID / NFC support - again

Issue #334 resolved
connochaetes created an issue

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)

  1. John Maloney repo owner

    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:

    scriptImage86524.png

    If that doesn't work, please post the simplest possible script that give the error and I'll take a look.

  2. connochaetes reporter

    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.

  3. John Maloney 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.)

  4. connochaetes 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.

  5. Log in to comment