Hi guys,
I’ve purchased a Grove - 125Khz Sensor to use on the GrovePi.
I’d like to know if this sensor is compatible and if you have any sample code on how to get it up and running?
Thanks
Hi guys,
I’ve purchased a Grove - 125Khz Sensor to use on the GrovePi.
I’d like to know if this sensor is compatible and if you have any sample code on how to get it up and running?
Thanks
Hi,
We have not tested this RFID shield but since it is Serial, you can connect it to the Raspberry Pi Serial Port “RPISER” on the board. Refer http://www.dexterindustries.com/GrovePi/engineering/
To check if the data is coming to Raspberry Pi, follow this tutorial http://www.dexterindustries.com/Arduberry/how-to-program-the-arduberry/#serial and set the Baud Rate to 9600. Place the RFID card over the reader and the card ID should come on the screen.
-Karan
Karan,
Thanks for confirming this is a serial sensor. Greatly appreciated.
Once I get everything up and running I’ll go through the tutorial, take a video and post the link to your forum.
Hi Karan,
I ran :
import serial
ser = serial.Serial(’/dev/ttyAMA0’, 9600)
while True:
print ser.readline()
but the command prompt stays blank regardless of a card swipe.
The sensor is connected to the Rpiser on the board as you suggested. The jumper is in U mode.
Hi,
The code does look right and it should be reading the card ID.
Please try the following:
Since we don’t have an RFID reader with us, it may take some effort to get it working with the GrovePi. If this does not help please let us know.
Thanks,
Karan
Karan,
Thanks for your help with this. I read into the pyserial documentation and realised that I might need a timeout on the serial command.
import serial
ser = serial.Serial(‘/dev/ttyAMA0′, 9600, timeout=1)
while True:
print ser.readline()
I haven’t had time to play around with the timeout value but this seems to work correctly or at least, the number is displayed in the shell.
Thanks for your help.
Hi,
Getting some sensors to work with pyserial is a bit tricky. We first try it out with a Serial Terminal like minicom or X-CTU and if the device works there, then we use pyserial. If it does not, then we take out the logic analyzer and try to figure out what’s not working.
Do try out a Serial terminal and arduino first.
-Karan