The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

Need help with NFC shield

by kevinljxljx on Wed Feb 06, 2013 11:30 pm

Hi guys. So I just got a Adafruit NFC shield today. I downloaded the library and burned the example program to my arduino Mega 1280. But it didn't work......... I connected VCC and GND (of course...), SDA and SCL to 20 and 21 port, analog 4,5 to analog 4,5 on Arduino board, Digital 2 to PWM 2 on Arduino board and RSt to RST. However, when I try to run the program, the Serial Monitor show "Hello, Didn't find PN53X board." Did I use the wrong library and wrong program or what? Can someone helps me out? Thanks!
kevinljxljx
 
Posts: 4
Joined: Mon Feb 04, 2013 12:44 am

Re: Need help with NFC shield

by adafruit_support_bill on Thu Feb 07, 2013 5:58 am

SDA and SCL to 20 and 21 port, analog 4,5 to analog 4,5 on Arduino board

Analog 4,5 are SDA and SCL on an UNO. On the Mega, you should only connect SDA, SCL to pins 20, 21.
User avatar
adafruit_support_bill
 
Posts: 27961
Joined: Sat Feb 07, 2009 9:11 am

Re: Need help with NFC shield

by kevinljxljx on Thu Feb 07, 2013 11:46 am

Thanks, I finally figure out that I connect the wrong port. :shock:
I have some more questions that I am trying to write something to my card, but the example programs seems doesn't like to work. Can you help me out?
Finally, I am confused about NDEF cards and mifare classic cards. What's the difference between these two types of card?
Thanks!
Attachments
QQ20130207-3.png
QQ20130207-3.png (38.93 KiB) Viewed 347 times
QQ20130207-1.png
QQ20130207-1.png (37.87 KiB) Viewed 347 times
kevinljxljx
 
Posts: 4
Joined: Mon Feb 04, 2013 12:44 am

Re: Need help with NFC shield

by adafruit_support_bill on Thu Feb 07, 2013 12:36 pm

the example programs seems doesn't like to work. Can you help me out?

Can you be more specific about the problem?

Finally, I am confused about NDEF cards and mifare classic cards. What's the difference between these two types of card?

NDEF support is limited at this point. There are a few threads on the forum related to this topic:

viewtopic.php?f=31&t=35489&p=175664
viewtopic.php?f=31&t=33836&p=174406&hilit=ndef#p167479

The detailed description of the differences is here:
http://www.nxp.com/documents/applicatio ... AN1304.pdf
User avatar
adafruit_support_bill
 
Posts: 27961
Joined: Sat Feb 07, 2009 9:11 am

Re: Need help with NFC shield

by kevinljxljx on Thu Feb 07, 2013 4:10 pm

yeah... so I was trying to use the example program to write my email address to the card, but when I try to upload the program, the software tells me error, like what the screenshot shows.
BTW, do you have a list of what command I can use with the library? Thanks!
kevinljxljx
 
Posts: 4
Joined: Mon Feb 04, 2013 12:44 am

Re: Need help with NFC shield

by adafruit_support_bill on Thu Feb 07, 2013 6:35 pm

There are three definitions of "url" in that example. You can only use one of the three, you have to comment out the other two.
User avatar
adafruit_support_bill
 
Posts: 27961
Joined: Sat Feb 07, 2009 9:11 am

Re: Need help with NFC shield

by kevinljxljx on Thu Feb 07, 2013 10:56 pm

ok I get it now...I can only use one out of three....
and how about this ? I don't know where the error come from....
Attachments
QQ20130207-2.png
QQ20130207-2.png (56.2 KiB) Viewed 307 times
kevinljxljx
 
Posts: 4
Joined: Mon Feb 04, 2013 12:44 am

Re: Need help with NFC shield

by adafruit_support_bill on Fri Feb 08, 2013 6:23 am

Move the array assignment up to the declaration line for data.
Code: Select all | TOGGLE FULL SIZE
uint8_t data[16] = {'a', 'd', 'a',     ... etc...
User avatar
adafruit_support_bill
 
Posts: 27961
Joined: Sat Feb 07, 2009 9:11 am