Code Monkey home page Code Monkey logo

rfid_library's Introduction

RFID Library

125Khz RFID library for Arduino.

This library only support TTL RS232 serial port.

125Khz RFID Reader

When read the data from some RFID card, you will get data like 00 91 6f 0b f5.

Example:

your card number: 0009531147
that your data  : 00 91 6f 0b f5

Notice, f5 is the check bit

f5 = 00^91^6f^0b

Pins

  1. VCC support 3.3 ~ 5V
  2. TX, RX connect to Arduino or Seeeduino
  3. T1, T2 is the Signal port for RFID antenna
  4. W0, W1 is for wiegand protocol, but this library not support yet.
     		+-----------+
++++++++----|VCC	  T1|----
|  +++++----|GND	  T2|----
|  | |++----|TX		 SER|----
|  | |	----|RX		 LED|----	
|  | |	----|W0		BEEP|----
|  | |	----|W1		 GND|----
|  | |		+-----------+
|  | \___________________________________
|  |_____________________________        |
|                                |       |
|                              + + + + + + + +  + + + + + + + +
|                              | | | | | | | |  | | | | | | | |
|                              | | | | | | | |  | | | | | | | |
|            +-----------------|-|-|-|-|-|-|-|--|-|-|-|-|-|-|-|-+
|            |                 x-x-x-x-x-x-x-x  x-x-x-x-x-x-x-x |
|            |              xxx                                 |
|       +--------+          xxx    --- ---    .............     |
|       |        |                | - x + |  ' |  ||\ |.-. '    +
|       |        |          ^      --- ---   | |__|| \|._. |     x
|       |        |        <+++>    ARDUINO   '.............'      +
|       +--------+          V                                     |
|            |            _____                       ++-++   xx  |
|            |           <_____>                      +-O-+   xx  |
|            |                                        ++-++   xx  |
|            |+--++--                                             |
|            ||||++--                  +---------------------+    |
|            |+--++--                  |                     |    |
|            |                         |                     |    |
|         ++------+                    +---------------------+    |
|         ++      |                                               +
|         ++      |          +-+ +-+                             x
|         ++------+          +-+ +-+   x-x-x-x-x-x x-x-x-x-x-x  +
|            +-------------------------|-|-|-|-|-|-|-|-|-|-|-|--+
|                                      | | | | | | | | | | | |
|                                      | | | | | | | | | | | |
|                                      + + + + + + + + + + + +
|____________________________________________|
	

Usage

Connecting RFID Reader RX, TX to Arduino pin headers.

RX <--> 10 TX <--> 11

// RFID_UART.ino

#include <SoftwareSerial.h>
#include <SeeedRFID.h>

#define RFID_RX_PIN 10
#define RFID_TX_PIN 11

#define TEST

SeeedRFID RFID(RFID_RX_PIN, RFID_TX_PIN);
RFIDdata tag;

void setup() {
	Serial.begin(57600);
	Serial.println("Hello, double bk!");
}

void loop() { 
	if(RFID.isAvailable()){
		tag = RFID.data();
		Serial.print("RFID card number: ");
		Serial.println(RFID.cardNumber());
#ifdef TEST
	Serial.print("RFID raw data: ");
	for(int i=0; i<tag.dataLen; i++){
	    Serial.print(tag.raw[i], HEX);
	    Serial.print('\t');
		}
#endif
	}
}

This library is written by Ye Xiaobo for seeed studio
and is licensed under The MIT License.

Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Analytics

rfid_library's People

Contributors

yexiaobo-seeedstudio avatar killingjacky avatar

Watchers

James Cloos avatar  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.