Jukebox. Reading NFC cards. Connecting all together
Today We are connecting the RC522 NFC-card reader. NFC reader RC-522 we are using needs to be connected to the SPI bus on the Raspberry Pi. RC522 pin Raspberry Pi pin SDA 24 (SPI0 CE0, GPIO 8) SCK 23 (SPI0 SCLK, GPIO 11) MOSI 19 (SPI0 MOSI, GPIO 10) MISO 21 (SPI0 MISO, GPIO 9) IRQ Not connected GND 20 (GND) RST Not Connected 3.3V 17 (3v3 Power) Software Make sure, the SPI interface is enabled on the Raspberry Pi. Start the "raspi-config" tool sudo raspi-config and there navigate to "Interface Options"->"SPI" and enable it. We will use MFRC522 library to communicate with the RF522 reader, it can be easily installed: pi@raspberrypi:~/rfid $ python3 -m pip install MFRC522 And write a simple script: 1 2 3 4 5 6 7 from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() while T...