{"id":22345122,"url":"https://github.com/seeed-studio/rfid_library","last_synced_at":"2025-04-06T21:15:09.423Z","repository":{"id":14231243,"uuid":"16938286","full_name":"Seeed-Studio/RFID_Library","owner":"Seeed-Studio","description":"125Khz RFID library for Arduino","archived":false,"fork":false,"pushed_at":"2025-01-08T08:55:37.000Z","size":20,"stargazers_count":61,"open_issues_count":0,"forks_count":29,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-30T19:09:25.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seeed-Studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-18T05:38:13.000Z","updated_at":"2025-01-08T08:55:40.000Z","dependencies_parsed_at":"2025-01-15T11:13:57.869Z","dependency_job_id":"5a47c1a8-9fc0-41f6-9bc9-2725062bc2dd","html_url":"https://github.com/Seeed-Studio/RFID_Library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Studio%2FRFID_Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Studio%2FRFID_Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Studio%2FRFID_Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Studio%2FRFID_Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seeed-Studio","download_url":"https://codeload.github.com/Seeed-Studio/RFID_Library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550690,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T09:16:41.355Z","updated_at":"2025-04-06T21:15:09.407Z","avatar_url":"https://github.com/Seeed-Studio.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"RFID Library  [![Build Status](https://travis-ci.com/Seeed-Studio/RFID_Library.svg?branch=master)](https://travis-ci.com/Seeed-Studio/RFID_Library)\n============\n\n125Khz RFID library for Arduino. \n\nThis library only support TTL RS232 serial port.\n\n![125Khz RFID Reader](https://statics3.seeedstudio.com/images/product/gr125k.jpg)\n\n\n[Grove - 125KHz RFID Reader\n](https://www.seeedstudio.com/s/Grove-125KHz-RFID-Reader-p-1008.html)\n\n\n\nWhen read the data from some RFID card, you will get data like `00 91 6f 0b f5`.\n\nExample:\n```\nyour card number: 0009531147\nthat your data  : 00 91 6f 0b f5\n```\n**Notice, f5 is the check bit**\n\n`f5 = 00^91^6f^0b`\n\n\n#### Pins \n\n1. VCC support 3.3 ~ 5V\n2. TX, RX connect to Arduino or Seeeduino\n3. T1, T2 is the Signal port for RFID antenna\n4. W0, W1 is for wiegand protocol, but this library not support yet.\n\n```\n     \t\t+-----------+\n++++++++----|VCC\t  T1|----\n|  +++++----|GND\t  T2|----\n|  | |++----|TX\t\t SER|----\n|  | |\t----|RX\t\t LED|----\t\n|  | |\t----|W0\t\tBEEP|----\n|  | |\t----|W1\t\t GND|----\n|  | |\t\t+-----------+\n|  | \\___________________________________\n|  |_____________________________        |\n|                                |       |\n|                              + + + + + + + +  + + + + + + + +\n|                              | | | | | | | |  | | | | | | | |\n|                              | | | | | | | |  | | | | | | | |\n|            +-----------------|-|-|-|-|-|-|-|--|-|-|-|-|-|-|-|-+\n|            |                 x-x-x-x-x-x-x-x  x-x-x-x-x-x-x-x |\n|            |              xxx                                 |\n|       +--------+          xxx    --- ---    .............     |\n|       |        |                | - x + |  ' |  ||\\ |.-. '    +\n|       |        |          ^      --- ---   | |__|| \\|._. |     x\n|       |        |        \u003c+++\u003e    ARDUINO   '.............'      +\n|       +--------+          V                                     |\n|            |            _____                       ++-++   xx  |\n|            |           \u003c_____\u003e                      +-O-+   xx  |\n|            |                                        ++-++   xx  |\n|            |+--++--                                             |\n|            ||||++--                  +---------------------+    |\n|            |+--++--                  |                     |    |\n|            |                         |                     |    |\n|         ++------+                    +---------------------+    |\n|         ++      |                                               +\n|         ++      |          +-+ +-+                             x\n|         ++------+          +-+ +-+   x-x-x-x-x-x x-x-x-x-x-x  +\n|            +-------------------------|-|-|-|-|-|-|-|-|-|-|-|--+\n|                                      | | | | | | | | | | | |\n|                                      | | | | | | | | | | | |\n|                                      + + + + + + + + + + + +\n|____________________________________________|\n\t\n```\n\n### Usage\nConnecting RFID Reader RX, TX to Arduino pin headers.\n\n`RX \u003c--\u003e 10`\n`TX \u003c--\u003e 11`\n\n```c\n// RFID_UART.ino\n\n#include \u003cSoftwareSerial.h\u003e\n#include \u003cSeeedRFID.h\u003e\n\n#define RFID_RX_PIN 10\n#define RFID_TX_PIN 11\n\n#define TEST\n\nSeeedRFID RFID(RFID_RX_PIN, RFID_TX_PIN);\nRFIDdata tag;\n\nvoid setup() {\n\tSerial.begin(57600);\n\tSerial.println(\"Hello, double bk!\");\n}\n\nvoid loop() { \n\tif(RFID.isAvailable()){\n\t\ttag = RFID.data();\n\t\tSerial.print(\"RFID card number: \");\n\t\tSerial.println(RFID.cardNumber());\n#ifdef TEST\n\tSerial.print(\"RFID raw data: \");\n\tfor(int i=0; i\u003ctag.dataLen; i++){\n\t    Serial.print(tag.raw[i], HEX);\n\t    Serial.print('\\t');\n\t\t}\n#endif\n\t}\n}\n\n```\n\n### Using multiple readers\nWhen using multiple readers, you'll need to call the 'listen' function in order to receive any future readings.\n```c\n// RFID_UART.ino\n\n#include \u003cSoftwareSerial.h\u003e\n#include \u003cSeeedRFID.h\u003e\n\n#define RFID_RX_PIN 10\n#define RFID_TX_PIN 11\n\n#define RFID2_RX_PIN 12\n#define RFID2_TX_PIN 13\n\n\nSeeedRFID RFID(RFID_RX_PIN, RFID_TX_PIN);\nRFIDdata tag;\n\nSeeedRFID RFID2(RFID2_RX_PIN, RFID2_TX_PIN);\nRFIDdata tag2;\n\nvoid setup() {\n  Serial.begin(9600);\n  RFID.listen(); //first, we listen for data on reader #1\n}\n\nvoid loop() { \n\n  if(RFID.isAvailable()){\n    tag = RFID.data();\n    Serial.print(\"RFID card number: \");\n    Serial.println(RFID.cardNumber());\n    RFID2.listen(); //now start listening for data on reader #2\n  }\n\n  if(RFID2.isAvailable()){\n    tag2 = RFID2.data();\n    Serial.print(\"RFID2 card number: \");\n    Serial.println(RFID2.cardNumber());\n    RFID.listen(); //then we listen to reader #1 again...\n  }\n}\n\n```\n\nFor more information please visit [wiki]([wiki](http://wiki.seeedstudio.com/Grove-125KHz_RFID_Reader/)).\n\n----\n\nThis library is written by [Ye Xiaobo][Github Homepage] for seeed studio\u003cbr\u003e\nand is licensed under [The MIT License](https://github.com/yexiaobo-seeedstudio/RFID_Library/blob/master/LICENSE). \u003cbr\u003e\n\nContributing to this software is warmly welcomed. You can do this basically by\u003cbr\u003e\n[forking](https://help.github.com/articles/fork-a-repo), committing modifications and then [pulling requests](https://help.github.com/articles/using-pull-requests) (follow the links above\u003cbr\u003e\nfor operating guide). Adding change log and your contact into file header is encouraged.\u003cbr\u003e\nThanks for your contribution.\n\nSeeed Studio is an open hardware facilitation company based in Shenzhen, China. \u003cbr\u003e\nBenefiting from local manufacture power and convenient global logistic system, \u003cbr\u003e\nwe integrate resources to serve new era of innovation. Seeed also works with \u003cbr\u003e\nglobal distributors and partners to push open hardware movement.\u003cbr\u003e\n\n\n[RFID Image]: http://www.seeedstudio.com/wiki/images/6/6a/RFID.jpg\n[Github Homepage]: https://github.com/yexiaobo-seeedstudio\n\n\n\n[![Analytics](https://ga-beacon.appspot.com/UA-46589105-3/RFID_Library)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeed-studio%2Frfid_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseeed-studio%2Frfid_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeed-studio%2Frfid_library/lists"}