Hi guys,
I have recently got my hands on the Adafruit PN532 board and I'm having a blast playing with it!
I have looked through the sketches and played around with them as much as I'm comfortable doing.
What i really need is a sketch that will let me add cards/remove cards from an internal database, and when a card that's in the database is presented i need a logic high sent to a pin that i can use for something else!
Kind of like a security entry system.
If anyone could help out, that would be great!
Thanks,
BillyJ
Adafruit PN532 RFID/NFC HELP
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ktownsend
- Posts: 1447
- Joined: Thu Nov 05, 2009 2:18 am
Re: Adafruit PN532 RFID/NFC HELP
Hi Billy:
I think you have everything you need on the PN532 side ... it looks like you just need to read the unique ID of the Mifare Ultralight or Mifare Classic card using the provided examples.
Getting that into a database and doing something with the data is a project in itself, though. Maybe someone on the forum here is interested in working on this together, or perhaps you can post it up on the Adafruit jobs forum if you're looking for someone to help you with it? http://www.adafruit.com/jobs/
Kevin
I think you have everything you need on the PN532 side ... it looks like you just need to read the unique ID of the Mifare Ultralight or Mifare Classic card using the provided examples.
Getting that into a database and doing something with the data is a project in itself, though. Maybe someone on the forum here is interested in working on this together, or perhaps you can post it up on the Adafruit jobs forum if you're looking for someone to help you with it? http://www.adafruit.com/jobs/
Kevin
-
- Posts: 5
- Joined: Tue Feb 05, 2013 6:29 pm
Re: Adafruit PN532 RFID/NFC HELP
Hi Kevin,
Thanks for the reply,
I can read the card no problems, but how would I go about adding to a database and sending a logic high if recognized?
I don't really want to post it in jobs and was hoping someone here could help?
Billy
Thanks for the reply,
I can read the card no problems, but how would I go about adding to a database and sending a logic high if recognized?
I don't really want to post it in jobs and was hoping someone here could help?
Billy
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit PN532 RFID/NFC HELP
What you are asking for is custom application development. You might be fortunate enough to find someone that has what you need. But we can't write it for you.
-
- Posts: 5
- Joined: Tue Feb 05, 2013 6:29 pm
Re: Adafruit PN532 RFID/NFC HELP
OK, fair enough.
where would i go looking? I've searched google, and i cant find much...
i would of thought it had been done before?
Thanks
EDIT: I'm being stupid... a better question to ask would be:
how do i edit the ladyada demo read sketch to output a high when it recognizes a certain card?
where would i go looking? I've searched google, and i cant find much...
i would of thought it had been done before?
Thanks
EDIT: I'm being stupid... a better question to ask would be:
how do i edit the ladyada demo read sketch to output a high when it recognizes a certain card?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit PN532 RFID/NFC HELP
Find this section of code and add your UID test as below:how do i edit the ladyada demo read sketch to output a high when it recognizes a certain card?
Code: Select all
// Wait for an ISO14443A type cards (Mifare, etc.). When one is found
// 'uid' will be populated with the UID, and uidLength will indicate
// if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
Serial.print(".");
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength, 10);
if (success)
{
// Display some basic information about the card
Serial.println("Found an ISO14443A card");
Serial.print(" UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
Serial.print(" UID Value: ");
nfc.PrintHex(uid, uidLength);
Serial.println("");
if (uid == MyUid) // compare with a code you know and trust
{
digitalWrite(13, HIGH); // Set pin 13 high
}
}
-
- Posts: 5
- Joined: Tue Feb 05, 2013 6:29 pm
Re: Adafruit PN532 RFID/NFC HELP
I get
Is there a modified library your using? And how would i declare Myuid?
Thank you for your help!
Code: Select all
no matching function for call to 'Adafruit_NFCShield_I2C::readPassiveTargetID(int, uint8_t [7], uint8_t*, int)'
Thank you for your help!
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit PN532 RFID/NFC HELP
Sorry. That was for a modified library. Just leave off th last parameter - 10.
-
- Posts: 5
- Joined: Tue Feb 05, 2013 6:29 pm
Re: Adafruit PN532 RFID/NFC HELP
ahh, ok thank you very much, i'll see what can be done
- Janes01
- Posts: 1
- Joined: Wed Feb 24, 2016 2:08 pm
Re: Adafruit PN532 RFID/NFC HELP
Billy J
I have also recently gotten my hand on the same board that you have and i want to write certin data to it, lets say "Hello"
Then I want to read that off again, ( and print it on an LCD shield, above the PN532)
This is all set up i am just confused with reading the stored data on the card.
Can you help by any chance
I have also recently gotten my hand on the same board that you have and i want to write certin data to it, lets say "Hello"
Then I want to read that off again, ( and print it on an LCD shield, above the PN532)
This is all set up i am just confused with reading the stored data on the card.
Can you help by any chance
Please be positive and constructive with your questions and comments.