Coder Social home page Coder Social logo

zhao20 / mfrc522-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mab5vot9us9a/mfrc522-python

0.0 1.0 0.0 116 KB

A small class to interface with the NFC reader Module MFRC522 as implemented by https://github.com/mxgxw/MFRC522-python.

Python 100.00%

mfrc522-python's Introduction

MFRC522-python

A small class to interface with the NFC reader Module MFRC522 on the Raspberry Pi.

This is a Python port of the example code for the NFC module RF522-AN.

Table of Contents

  1. Install on Raspberry Pi running Jessie
  2. Install on Raspberry Pi running Wheezy
  3. Usage
  4. Useful Resources
  5. Disclaimer

Install on Raspberry Pi running Jessie

0 – Latest Kernel

Make sure you have the latest kernel (>= 4.4.14), because it fixes a bug in earlier version Issue #1547. You can check your version using:

uname -a | sed -E "s/.*([0-9]+\.[0-9]+\.[0-9]+)-v.*/\1/"

If you need to update your kernel, use sudo rpi-update. If it's not yet installed, do so using sudo apt-get install rpi-update.

1 – Wiring

RF522 Module Raspberry Pi
SDA Pin 24 / GPIO8 (CE0)
SCK Pin 23 / GPIO11 (SCKL)
MOSI Pin 19 / GPIO10 (MOSI)
MISO Pin 21 / GPIO9 (MISO)
IRQ
GND GND
RST Pin 22 / GPIO25
3.3V 3.3V

2 – Activate SPI

sudo raspi-config

And then go to 9 – Advanced Options > A5 SPI and enable the SPI interface. Reboot (sudo shutdown -r now). You can verify a successful configuration by entering

ls /dev/spi*

The output should be similar to the following, thus confirming the existence of the necessary sockets.

/dev/spidev0.0  /dev/spidev0.1

3 – Install Software

Make sure you have Python and Git installed:

sudo apt-get install git python3-dev --yes

3.1 – SPI-Py

git clone https://github.com/mab5vot9us9a/SPI-Py && cd SPI-Py
sudo python3 setup.py install
cd ..

3.2 – Raspberry Pi RFID RC522 Library

git clone https://github.com/mab5vot9us9a/MFRC522-python.git && cd MFRC522-python

4 – Check everything's working

python3 Dump.py

and place your tag (MIFARE Classic 1K (S50)) on the reader to dump its data.

Install on Raspberry Pi running Wheezy

Follow these instructions: RASPBERRY PI RFID RC522 TAGS AUSLESEN (NFC).

Usage

Import the class by importing MFRC522 in the top of your script. For more info see the examples.

Useful Resources

Disclaimer

Instructions adapted from tutorials-raspberrypi.de.
Original source code: https://github.com/mxgxw/MFRC522-python.

mfrc522-python's People

Contributors

mab5vot9us9a avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.