Create rfid.py

This commit is contained in:
James Devine 2017-10-29 18:59:46 +01:00 committed by GitHub
parent afe5284c82
commit 27cd630fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
readingData/rfid.py Normal file
View file

@ -0,0 +1,8 @@
import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=0.2)
while True:
rcv = port.readline()
if len(rcv) > 10:
print "tag detected: " + rcv