RFID Interfacing with Arduino
What is RFID?
Radio Frequency Identification (RFID) is a wireless Identification technology that uses radio waves to identify the presence of RFID tags.
The RFID system is based on two basic elements:-
1. RFID tag:- The RFID tag includes a microchip with a radio antenna mounted on a substrate that carries 12-byte unique identification numbers.
2. RFID Module:- The RFID Module is used to read unique IDs from the tags. whenever an RFID tag comes in range, the RFID reader reads its unique ID and Transmits it serially to the microcontroller.
Image of RFID Module:-
Task 1: To display an RFID Tag value on a Serial monitor.
Code:-
void setup ()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available()>=0)
{
String ch =Serial.readString();
Serial.println(ch);
}
}
Output:-
Task 2: To display a RFID tag value on a LCD.
Code:-
#include<LiquidCrystal.h>
LiquidCrystal lcd(13,12,5,4,3,2);
void setup ()
{
lcd.begin(16,2);
Serial.begin(9600);
}
void loop ()
{
if (Serial.available()>0)
{
lcd.clear();
String ch = Serial.readString();
lcd.setCursor(0,0);
lcd.print(ch);
delay(1000);
}
}
Output:-
0 Comments