Using MOD-RFID1356 in Serial Mode by Python

This continues from previous post. Now I write small Python script that uses serial port by pySerial library. Installation pySerial on Raspberry Pi just using command

pip install  pyserial

Script continues to read from /dev/ttyACM0 device that is connected with MOD-RFID1356. Be careful punctuation in Python. Please read PEP8 first.

import serial

ser = serial.Serial('/dev/ttyACM0', 9600, timeout=0)
while True:
    line = ser.readline()
    if (line):
        print (line)

or get this script from http://pastebin.com/5X9Dpkx0

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s