wassimsb 0 Posted March 11, 2014 Share Posted March 11, 2014 where can i find it ? Quote Link to post Share on other sites
leonthegeek 0 Posted March 12, 2014 Share Posted March 12, 2014 Hi Thanks for sharing this, its the first code I've found that actually differentiates between cards. Been searching for a few days now and still very new to ide / c. Thanks Leon Quote Link to post Share on other sites
igorx 0 Posted March 24, 2014 Share Posted March 24, 2014 Hi! Tell me pls one thing which i cann't understand : we have the RC522 module powered by 3.3v . What power do i need for Arduino - 3.3v or it is possible to connect to 5 v power suply ? -- Thanks!! Quote Link to post Share on other sites
traxman 23 Posted March 28, 2014 Share Posted March 28, 2014 I finished RFID boosterpack (RC522). http://forum.43oh.com/topic/5259-43oh-rfid-booster-pack-nfrc522/ Quote Link to post Share on other sites
D69 3 Posted April 1, 2014 Share Posted April 1, 2014 Igorx, this is for the msp430 launchpad, not arduino but both dev boards will take 5v and have a 3v output you can use Quote Link to post Share on other sites
XYNTAXIS 0 Posted April 17, 2014 Share Posted April 17, 2014 Hi everyone! Anybody know how to start RC522 in listening mode? I need to take all data that fly between reader and card. Thx! Quote Link to post Share on other sites
OppaErich 25 Posted May 29, 2014 Share Posted May 29, 2014 I guess I need a new hobby, I'm too numb for Energia... Quote Link to post Share on other sites
xujianningkp 0 Posted June 16, 2014 Share Posted June 16, 2014 Hi everybody, >>> UPDATE - Made "proper" Energia Library out of it. Now with proper named methods/class members<<< >>> UPDATE 2 - Added "keywords.txt" file for syntax highlighting, added comments to "Mfrc522.cpp" file explaining methods (thanks to Grant) - Added example to read cards contents of block 1 <<< >>> UPDATE 3 - You need to apply the USCI SPI fix proposed by Spirilis (post #22) in the following thread: http://forum.43oh.com/topic/3237-energia-library-nordic-nrf24l01-library/page-2 , otherwise the card reader won't work! <<<< I wanted to share my results with the MF RC522 RFID reader. I found an article from Grant Gibson (http://www.grantgibson.co.uk/blog/2012/04/how-to-get-started-with-the-mifare-mf522-an-and-arduino/#comments) where he used a cheap reader from eBay to read Mifare cards. (http://www.ebay.com/itm/Mifare-RC522-RFID-13-56Mhz-Module-SPI-Interface-with-a-IC-Card-/370690680474?pt=LH_DefaultDomain_0&hash=item564ee2e69a) The command set and technical aspects of the MFRC522 chip can be found in the datasheet: http://www.nxp.com/documents/data_sheet/MFRC522.pdf I have ported the example to Energia. Very simple by removing all Chinese comments and replacing uchar with unsigned chars. After these changes it works like a charm. Just connect the following lines: MOSI LP -> Pin 3 of the module MISO LP -> Pin 4 of the module PIn 1.3 LP -> Pin 1 of the module (SS) Pin 2.2 LP -> Pin 7 of the module (RST) Pin 1.5 LP -> Pin 2 of the module (SCK) GND LP -> Pin 6 of the module VCC LP -> Pin 8 of the module Pin 5 is not connected. Included is the sketch (Mfrc522.zip) I used. Now onto opening doors and paying electronically! Kind regards, Eelco Do you think this library will works with connected launchpad TM4C129XL? and where are these pins located? thanks Quote Link to post Share on other sites
NickTompkins 4 Posted June 17, 2014 Share Posted June 17, 2014 Yea what this guy said above :-) Quote Link to post Share on other sites
Regio 0 Posted June 20, 2014 Share Posted June 20, 2014 OK, spent a bit of time on this this evening. Tried knocking together some code to allow hard coding of tag IDs which works OK. Might need to change the for loop though as anything in else just gets repeated, a switch might do the trick but it's late. For anyone interested, here's my code, would appreciate any improvements that could be made, including an scenario where the tag's not recognized as valid. /* Example file for communicating with the NFRC522. The program prints the card data. Created by Eelco Rouw - Originally adapted by Grant Gibson. */ // Pinout // SDA - 2.2 // SCK - 1.5 // Mosi - 1.7 // Miso - 1.6 // IRQ - NC // GND - GND // RST - 1.3 // VCC - VCC #include <Mfrc522.h> // the sensor communicates using SPI, so include the library: #include <SPI.h> int chipSelectPin = 10; int NRSTDP = 5; int ledpin1 = 3; int ledpin2 = 6; int cardint = 5; Mfrc522 Mfrc522(chipSelectPin,NRSTDP); unsigned char serNum[5]; unsigned char sectorKey[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; unsigned char readData[16]; void setup() { Serial.begin(9600); // RFID reader SOUT pin connected to Serial RX pin at 2400bps // Start the SPI library: SPI.begin(); // Initialize the Card Reader digitalWrite(chipSelectPin, LOW); pinMode(RED_LED, OUTPUT); pinMode(ledpin1, OUTPUT); pinMode(ledpin2, OUTPUT); Mfrc522.Init(); } void loop() { unsigned char i,tmp; unsigned char status; unsigned char str[MAX_LEN]; unsigned char RC_size; unsigned char blockAddr; //String mynum = ""; String mycardno; char* myarray[2][5]={ //Array of tags and related names, tag numbers copied from serial console after 1s {"205928944228","1251291514471","7748944415","157172894468","611918944247"}, {"Dad","Mum","Baby","Dog","Cat"} }; status = Mfrc522.Request(PICC_REQIDL, str); if (status == MI_OK) { Serial.println("Card detected"); Serial.print(str[0],BIN); Serial.print(" , "); Serial.print(str[1],BIN); Serial.println(" "); } status = Mfrc522.Anticoll(str); memcpy(serNum, str, 5); if (status == MI_OK) { Serial.println("The card's number is : "); Serial.print(serNum[0], DEC); Serial.print(" , "); Serial.print(serNum[1], DEC); Serial.print(" , "); Serial.print(serNum[2], DEC); Serial.print(" , "); Serial.print(serNum[3], DEC); Serial.print(" , "); Serial.print(serNum[4], DEC); Serial.println(" "); mycardno = String(serNum[0]) += String(serNum[1]) += String(serNum[2]) += String(serNum[3]) += String(serNum[4]); // Appends the content of the serNum array to give a unique card no Serial.println(mycardno); Mfrc522.SelectTag(serNum); status = Mfrc522.Auth(PICC_AUTHENT1A,1,sectorKey,serNum); if (status == MI_OK) { Serial.println("Authenticated...\r\n"); } else { Serial.println("Error authenticating...\r\n"); } status = Mfrc522.ReadBlock(1, readData); if (status == MI_OK) { for(i=0; i<16; i++) { Serial.write(readData[i]); delay(10); } } else { Serial.println("Error reading."); } int i; for(i = 0; i < 5; i = i + 1) { if (mycardno == myarray[0][i]) { Serial.print("Hello "); Serial.println(myarray[1][i]); // Should Print out name matching tag } /*else { Serial.println("Bugger Off"); }*/ } delay(1000); Mfrc522.Init(); } //Serial.println(" "); Mfrc522.Halt(); } Hi, I was following your code and pinout, but it Quote Link to post Share on other sites
quochung 0 Posted September 28, 2014 Share Posted September 28, 2014 Sorry everyone, but i can't debug the code for my kit. Cause it is a mistake, this is "sketch_step28a.ino:16:21: fatal error : Mfrc522.h: No such file or directory compilation terminated." I can't fix it. Pls help me. Tks Quote Link to post Share on other sites
D69 3 Posted September 28, 2014 Share Posted September 28, 2014 Looks like you've not installed the library correctly. Double check it's in the right place quochung 1 Quote Link to post Share on other sites
quochung 0 Posted September 29, 2014 Share Posted September 29, 2014 Looks like you've not installed the library correctly. Double check it's in the right place How i can installed the library? I do everything in the prev page. Quote Link to post Share on other sites
D69 3 Posted September 29, 2014 Share Posted September 29, 2014 Have you downloaded the library and extracted it to your energia folder? Quote Link to post Share on other sites
quochung 0 Posted September 29, 2014 Share Posted September 29, 2014 everything i do alright? Tks! https://www.dropbox.com/s/mt8emrkd2o0bs57/122.png?dl=0 https://www.dropbox.com/s/jujvgyp6ju05av9/aaaaaa.png?dl=0 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.