Dear customer,
Thank you very much for choosing our product.
In the following we will show you what has to be observed during commissioning and use. Should you
encounter any unexpected problems during use, please feel free to contact us.
Connect the RFID module to the pins of your Arduino as shown in the following picture and in the table in
Chapter 2.
Publ ished: 08 .07.2019 Copyright by Joy-IT 4
RFID Module
3.2 INSTALLING THE MODULE
In order to use the module with your Arduino, it is rst necessary to install the MFRC522 library from the
Arduino library manager.
In the window that opens, enter the term "MFRC522" in the search eld and install the library.
Publ ished: 08 .07.2019 Copyright by Joy-IT 5
RFID Module
3.3 EXAMPLE APPLICATION
Aer you have successfully installed the library, your module is ready for use.
You can use the following code example and transfer it to your Arduino to start up and test the module.
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9
#define SS_PIN 10
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
//Initialisierung des RFID-ModulsSerial.begin(9600);while (!Serial);
SPI.begin();mfrc522.PCD_Init();mfrc522.PCD_DumpVersionToSerial();//Details des Lesegerätes ausge-
ben
Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
}
void loop() {
//Suche nach neuen Karten if ( ! mfrc522.PICC_IsNewCardPresent()) {
return;}
if ( ! mfrc522.PICC_ReadCardSerial()) {
return;}
//Informationsabruf des RFID-Gerätes mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}
Publ ished: 08 .07.2019 Copyright by Joy-IT 6
RFID Module
4. USI NG WI TH A RA S PBERRY PI
4.1 CONNECTING THE MODULE
Connect the RFID module to the pins of your Raspberry Pis as shown in the following gure and in the
table in Chapter 2.
Publ ished: 08 .07.2019 Copyright by Joy-IT 7
RFID Module
4.2 SETTING UP THE SYSTEM
If you are already using a current Raspbian system on your Raspberry, you can skip this step and proceed
immediately to step 3.
First download the latest version of the Raspbian operang system here. With the help of a suitable
program (e.g. „Win32 Disk Imager“) you can install the downloaded image le on a micro-SD card.
Once the process is complete, you can insert the micro-SD card into your Raspberry Pi and start it.
Publ ished: 08 .07.2019 Copyright by Joy-IT 8
RFID Module
4.3 INSTALLING THE MODULE
Before you can use the module, it is necessary to install addional libraries.
Open a terminal window on your Raspberry Pi and enter the following commands:
print("Now place tag next to the scanner to write")
try:
id, text = reader.read()
print(id)
print(text)
finally:
GPIO.cleanup()
RFID Module
Now enter the following command to create the script for wring:
sudo nano Write.py
Enter the following script in this le:
#!/usr/bin/env python
import RPi.GPIO as GPIO
import sys
sys.path.append('/home/pi/MFRC522-python')
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
whileTrue:
text = raw_input('Your Text: ')
print("Now place tag next to the scanner to write")
id, text = reader.write(text)
print("recorded")
print(id)
print(text)
break
finally:
GPIO.cleanup()
Publ ished: 08 .07.2019 Copyright by Joy-IT 10
RFID Module
4.4 EXAMPLE APPLICATIONS
The library now installed already contains sample applicaons for reading and wring.
You can start the applicaon for reading with the following command:
sudo python Read.py
Run the le to write a clip or a card with the following command:
sudo python Write.py
Publ ished: 08 .07.2019 Copyright by Joy-IT 11
RFID Module
5. INFOR MATION- A N D TAKE-BACK OBLIGATIONS
Symbol on electrical and electronic equipment
This crossed-out dustbin means that electrical and electronic appliances do not belong in the household
waste. You must return the old appliances to a collecon point. Before handing over waste baeries and
accumulators that are not enclosed by waste equipment must be separated from it.
Return opons
As an end user, when you purchase a new device, you can return your old device (which essenally fulls
the same funcon as the new one purchased from us) free of charge for disposal. Small appliances with
no external dimensions greater than 25 cm can be disposed of in normal household quanes
independently of the purchase of a new appliance.
Possibility of return at our company locaon during opening hours
We will send you a parcel stamp with which you can return the device to us free of charge. Please contact
us by e-mail at Service@joy-it.net or by telephone.
Informaon on packaging
If you do not have suitable packaging material or do not wish to use your own, please contact us and we
will send you suitable packaging.
Publ ished: 08 .07.2019 Copyright by Joy-IT 12
RFID Module
6. SUPP ORT
We are also there for you aer the purchase. If you sll have quesons or problems, we are also available
by e-mail, telephone and cket support system.