All Projects → abobija → esp-idf-rc522

abobija / esp-idf-rc522

Licence: MIT license
C library for interfacing ESP32 with MFRC522 RFID card reader, packaged as ESP-IDF component

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to esp-idf-rc522

RFID-cloner
Handy device for cloning RFID chips/cards.
Stars: ✭ 55 (-8.33%)
Mutual labels:  card, rfid, mfrc522
TonUINO
Alternative TonUINO Firmware
Stars: ✭ 112 (+86.67%)
Mutual labels:  rfid, mfrc522
Esp Rfid Tool
A tool for logging data/testing devices with a Wiegand Interface. Can be used to create a portable RFID reader or installed directly into an existing installation. Provides access to a web based interface using WiFi in AP or Client mode. Will work with nearly all devices that contain a standard 5V Wiegand interface. Primary target group is 26-37bit HID Cards. Similar to the Tastic RFID Thief, Blekey, and ESPKey.
Stars: ✭ 262 (+336.67%)
Mutual labels:  card, reader
Chameleonmini
The ChameleonMini is a versatile contactless smartcard emulator compliant to NFC. The ChameleonMini was developed by https://kasper-oswald.de. The device is available at https://shop.kasper.it. For further information see the Getting Started Page https://rawgit.com/emsec/ChameleonMini/master/Doc/Doxygen/html/_page__getting_started.html or the Wiki tab above.
Stars: ✭ 1,133 (+1788.33%)
Mutual labels:  card, reader
binstruct
Golang binary decoder for mapping data into the structure
Stars: ✭ 67 (+11.67%)
Mutual labels:  reader
Reader
高仿多看阅读器apk,支持PDF解析.文档支持搜索,高亮文字,墨迹等功能
Stars: ✭ 98 (+63.33%)
Mutual labels:  reader
osmosfeed
Turn GitHub into an RSS reader
Stars: ✭ 839 (+1298.33%)
Mutual labels:  reader
hs-art-extractor
A tool to extract Hearthstone card art from the game files
Stars: ✭ 21 (-65%)
Mutual labels:  card
ariel-news-app
News App developed with Flutter featuring beautiful UI, category-based news, story for faster news reading, inbuilt article viewer, share feature, and more.
Stars: ✭ 31 (-48.33%)
Mutual labels:  reader
react-native-config-reader
🛠 Easily access any of the build configs defined in build.gradle or info.plist from your JS code.
Stars: ✭ 44 (-26.67%)
Mutual labels:  reader
cookiecutter-esp32-webserver
Cookiecutter template to get you quickly started with an ESP32-based webserver project.
Stars: ✭ 13 (-78.33%)
Mutual labels:  esp-idf
readability-cli
A CLI for Mozilla Readability. Get clean, uncluttered, ready-to-read HTML from any webpage!
Stars: ✭ 41 (-31.67%)
Mutual labels:  reader
LANraragi cn
This repo is a fork of Difegue / LANraragi , those things i've done was to translate this repo into chinese ,and fix chrome browser js problem.
Stars: ✭ 147 (+145%)
Mutual labels:  reader
ReactZooApp
ReactZooApp
Stars: ✭ 33 (-45%)
Mutual labels:  card
react-viewer
Online EPUB/Comics viewer
Stars: ✭ 52 (-13.33%)
Mutual labels:  reader
react-simple-card
React simple card component
Stars: ✭ 23 (-61.67%)
Mutual labels:  card
alarmo-card
Home Assistant card for controlling the Alarmo component
Stars: ✭ 59 (-1.67%)
Mutual labels:  card
WebAppReader
基于 html5 、 Vue.js 、 Koa、Node.js 以及 EJS 的手机小说阅读器。使用 node.js 模拟后台数据,无实际后台,完全的前后端分离开发。
Stars: ✭ 15 (-75%)
Mutual labels:  reader
ChameleonMini
The ChameleonMini is a versatile contactless smartcard emulator compliant to NFC. The ChameleonMini was first developed by KAOS. This is NOT the official repo for KAOS's ChameleonMini. For further information see the Getting Started Page
Stars: ✭ 350 (+483.33%)
Mutual labels:  rfid
oseid
Microchip AVR based smartcard/token with ECC and RSA cryptography
Stars: ✭ 17 (-71.67%)
Mutual labels:  card

esp-idf-rc522

C library for interfacing ESP32 with MFRC522 RFID card reader.

Library currently just reads serial number of RFID tags, which is enough for most applications.

How to use

This directory is an ESP-IDF component. Clone it (or add it as submodule) into components directory of the project.

Example

This is basic example of scanning RFID tags.

#include <esp_log.h>
#include <inttypes.h>
#include "rc522.h"

static const char* TAG = "rc522-demo";
static rc522_handle_t scanner;

static void rc522_handler(void* arg, esp_event_base_t base, int32_t event_id, void* event_data)
{
    rc522_event_data_t* data = (rc522_event_data_t*) event_data;

    switch(event_id) {
        case RC522_EVENT_TAG_SCANNED: {
                rc522_tag_t* tag = (rc522_tag_t*) data->ptr;
                ESP_LOGI(TAG, "Tag scanned (sn: %" PRIu64 ")", tag->serial_number);
            }
            break;
    }
}

void app_main()
{
    rc522_config_t config = {
        .spi.host = VSPI_HOST,
        .spi.miso_gpio = 25,
        .spi.mosi_gpio = 23,
        .spi.sck_gpio = 19,
        .spi.sda_gpio = 22,
    };

    rc522_create(&config, &scanner);
    rc522_register_events(scanner, RC522_EVENT_ANY, rc522_handler, NULL);
    rc522_start(scanner);
}

FAQ

How to use I2C instead of SPI?

Set the property .transport of the config structure to RC522_TRANSPORT_I2C and choose GPIOs for data (.i2c.sda_gpio) and clock (.i2c.scl_gpio):

rc522_config_t config = {
    .transport = RC522_TRANSPORT_I2C,
    .i2c.sda_gpio = 18,
    .i2c.scl_gpio = 19,
};

How to use halfduplex in SPI transport?

Set the .spi.device_flags property of the config to SPI_DEVICE_HALFDUPLEX. Other device flags (SPI_DEVICE_*) can be set here as well by chaining them with bitwise OR (|) operator.

rc522_config_t config = {
    .spi.host = VSPI_HOST,
    .spi.miso_gpio = 25,
    .spi.mosi_gpio = 23,
    .spi.sck_gpio = 19,
    .spi.sda_gpio = 22,
    .spi.device_flags = SPI_DEVICE_HALFDUPLEX,
};

How to attach RC522 to existing SPI bus?

Let's say that spi bus VSPI_HOST has been already initialized, and rc522 needs to be attached to that bus. That can be accomplished with the next configuration. Property .spi.bus_is_initialized is required to be set to true in order to inform library to not initialize spi bus again.

NOTE: Property .spi.bus_is_initialized will be deprecated in the future once when this issue is resolved.

rc522_config_t config = {
    .spi.host = VSPI_HOST,
    .spi.sda_gpio = 22,
    .spi.bus_is_initialized = true,
};

Author

GitHub: abobija
Homepage: abobija.com

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].