You are currently viewing Python Software for RFID using Arduino IDE
Python Software For RFID Using Arduino IDE

Python Software for RFID using Arduino IDE

Spread the love
Python Software For RFID Using Arduino IDE
Python Software For RFID Using Arduino IDE

Introduction : 

We know that most of the Automation project use RFID system for the different kind of operation. This RFID system read the Information which is available on the RFID Tags but this data is displayed  on Arduino’s serial monitor. So, if you want to it’s display on LAPTOP OR COMPUTER screen then this project code help you.

By using this python code for any kind of the RFID projects (Arduino UNO) you will able to display proper information in the form of a table on your laptop/pc screen.

Procedure: Python Software For RFID Using Arduino IDE=

Step 1 : For the code explanation purposed we simply take one common project example : Implementation of digital system for college management. In this project we are use RFID for collect the information about Roll number , name of the student  etc.

Step 2 : So next question is How the data collects to COM port?

Let’s connect the our Arduino UNO  to COM port 4 in our PC (Arduino IDE) 

Step 3: Use following Arduino code for this project (To collecting students information) :

void setup() {  

Serial.begin(9600);  }void loop() {    

Serial.print("id=1200; name=Sachin; rollnumber=115;");    

Serial.print("\n ");  delay(4000);    

Serial.print("id=1201; name=Ashwini; rollnumber=155;");    

Serial.print("\n ");    


Serial.print("id=1202; name=Rajshree; rollnumber=14;");    

Serial.print("\n ");    



Step 3: After the run this code successfully it’s gives following output on Arduino’s serial monitor :

id=1200; name=Sachin; rollnumber=115;id=1201; name=Ashwini; rollnumber=155;id=1202; name=Rajshree; rollnumber=14; (... continue)

Step 4 : Python code for Python Software For RFID Using Arduino IDE

How is the software processing data?

We know that our Arduino is connected to the port No. 2 so we write ‘COM2’ in the input box:

Labelh=Label(root,text='Enter port Name. E.g: COM2',font=("Arial","14")).place(x=120,y=40)

Then python program  starts to reading ‘COM2’ and saves every line in a string with the help of following code

thing = self.ser.readline().decode('ascii')        

string = str(thing)

for i in range(2, len(string)):       

    if string[i] == ';':           


v = string[3:i]   

for j in range(10, len(string)):       

    if string[j] == ';':           


c = string[i + 7:j]    

or k in range(20, len(string)):       

    if string[k] == len(string):           


p = string[j + 13:k-1]

call.execute("INSERT INTO rfid (datestamp, id, name, rollnumber) VALUES (?,?,?,?)", (date, v, c, p))                


call.execute('SELECT * FROM rfid ORDER BY datestamp DESC LIMIT 5')for row in call.fetchall():    


self.tree.insert("", 0, text="FETCHED --- >", values=(date, v, c, p))

Step 5 : After the Running this python code successfully, all the required information will be display on your laptop screen

Summary : In this project we saw Python Software For RFID Using Arduino IDE to display data on Laptop in simple way. so friends any problem about this project then free to ask me.


Resources : Arduino official site

sachin Pagar

I am Mr. Sachin pagar Embedded software engineer, the founder of Sach Educational Support(Pythonslearning), a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

Leave a Reply