RFID Activated LED
This instructable shows you how to use an RFID reader to scan a card and show it is authorised using green and red LEDs
Supplies
RFID module
Green LED(1)
Red LED(1)
Arduino UNO(1)
Jumper Wires(11)
Breadboard(1)
330 ohm resistor(2)
Wiring the RFID Sensor
Connect the RFID to the arduino according to the diagram above
SDA-D10
SCK-D13
MOSI-D11
MISO-D12
RST-D9
VCC-3.3V
GND-GND
Wiring the LED's to the Arduino
Wire the LED's according to the picture make sure to connect the anode's of the red LED to pin 2 and the green LED to pin 3 then connect the cathodes of the LED's to ground
This allows the arduino to control when the LED lights up
Arduino Code
The code works by checking for card scans in the loop. If the scanned card's UID matches the UID set in the code the green LED lights up if not, then the red LED lights up
Make sure to Replace the Values in ((content.substring(1) ==" ") to the UID of your own card
This code also uses MFRC522 RFID library as well as the SPI library. Make sure they are downloaded and included before you upload the code or else it will not work.
Final Product
If everything is done correctly when a valid card is scanned the green LED turns on and if the incorrect card is scanned the red LED turns on