Create rfid.py
This commit is contained in:
parent
afe5284c82
commit
27cd630fe8
1 changed files with 8 additions and 0 deletions
8
readingData/rfid.py
Normal file
8
readingData/rfid.py
Normal 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
|
||||||
Loading…
Reference in a new issue