Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Parallax RFID and Johnny-Five

Parallax RFID and Johnny-Five


I have a parallax Rfid reader and I am confused on where to start when using johnny-five with it. I am trying to use this as guidance - - but obviously that does not use johnny-five.

I don't know if I should be starting with a johnny-five object to read the data and interact with the sensor, or if I should skip that and be using serialport directly. If I use serialport how exactly do I do that?


1381834286406 Board Connecting... 
1381834286421 Serial Found possible serial port /dev/cu.usbmodemfa141
1381834286422 Board -> Serialport connected /dev/cu.usbmodemfa141
err undefined
results 3


var sp = new SerialPort("/dev/cu.usbmodemfa141", {
  parser: serialport.parsers.readline("\r") ,
  baudrate: 2400
}, false); () {
  sp.on('data', function(data) {
    console.log('data received: ' + data);
  sp.write("ls\n", function(err, results) {
    console.log('err ' + err);
    console.log('results ' + results);
Problem courtesy of: RyanHirsch


Johnny five is Node.js for robots but on your computer. The javascript code is executed on your computer. On the Arduino, you need to upload StandarFirmata as explained on their github page.

The code from the Arduino RFID tutorial you gave us if for Arduino only. If you want to use it with johnny five, you need to implement the code by your self or look for someone who did that for you on github. If you're having this problem, chances are someone else also had it and might have found an answer.

With node serialport, you'll be able to read the Serial.print() outputs of the Arduino. You can output json and parse it with javascript on your computer using serialport.

Hope it helps !

If you need more help, feel free to ask! :)


So if I understand it correctly: you have the RFID reader connected to the Arduino. The Arduino is connected to a computer. You want to read the RFID and send the information to the computer. The computer must be running a server and must be able to get the data from the USB port. All people connected to the server from the iPad should see the information in realtime. Is that correct?

If so, you need a node server, node-serialport to get the data from the USB and a web app such as express.js to show the data to your clients. The best way to do that would be to format your data as json so that it could be easily parsable on the server.

EDIT 2: Okay! So here you can find two great tutorials by Tom Igoe on how to use Arduino and Node.js.

  • Arduino Serial to Browser: Here you'll learn the basics of node-serialportand how to use it with your Arduino.
  • Serial to Browser using node.js : Here you'll learn how to JSONize your Arduino data so that they can be easily accessible through your web app and websocket. He uses an accelerometer for his data, but I guess you can directly use your RFID data.

I'm sure that you'll have many more questions after this but it will be a good start!

Hope it helps! :)

Solution courtesy of: ladislas


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Parallax RFID and Johnny-Five


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription