2
votes

I need to use the RFID-RC522 module in my Johnny Five project (it is an NFC reader).

There is an arduino Library that makes it easy to interface with that: https://github.com/miguelbalboa/rfid

Can i use this library through Johnny-Five? If yes, how?

1
Did you have any luck with this, Morrisda? Looking at the same challenge.Gavin
I used github.com/voodootikigod/node-serialport . I think i had some issues with Jhonny-five because i was using node webkit. I think you can do @GavinMorrisda

1 Answers

5
votes

Short answer: Yes.

Long answer: You'll need some work.

JohnnyFive uses Firmata to interact with Arduino. Firmata is a program you upload on the Arduino that will allow you to interface it easily with your computer using different languages such as Python, JS, C/C++ and so on.

Your problem is that you cannot have Firmata and a custom program using the RFID library on your Arduino at the same time.

So you have to choices:

  • port the RFID library to be used with johnny five. should not be too difficult and johnny five provides extensive documentation
  • are you sure your need johnny five? you could also implement a simple interface through serial with your Arduino and write a simple program to use the RFID library on the Arduino. You can then send the data from the Arduino to the computer and wait for serial inputs from the computer to the Arduino.

The second solution will be easier and simpler if you don't need Johnny five.

As you said you are new to Arduino Programming, I would advise you to start small with just Arduino code before moving to Arduino+JS.

Hope this helps :)