Coder Social home page Coder Social logo

adafruit_nfcshield_i2c's Introduction

*** DEPRECATED! ***

This library is now deprecated and will not be maintained.  The NFC shield
and I2C communication logic has been merged into the Adafruit-PN532 library
with no loss of functionality.  Please see this page for details on 
installing and using the Adafruit-PN532 library in place of this 
Adafruit_NFCShield_I2C library:
  https://learn.adafruit.com/adafruit-pn532-rfid-nfc/arduino-library

*** DEPRECATED! ***

This is a library for the Adafruit PN532 NFC/RFID breakout boards
This library works with the Adafruit NFC breakout and shield
  ----> https://www.adafruit.com/products/364
  ----> https://www.adafruit.com/products/789
 
Check out the links above for our tutorials and wiring diagrams 
These chips use SPI or I2C to communicate

Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!

Written by Limor Fried/Ladyada & Kevin Townsend for Adafruit Industries.  
BSD license, check license.txt for more information
All text above must be included in any redistribution

To download: click the ZIP button above, rename
the uncompressed folder Adafruit_NFCShield_I2C. Check that the
Adafruit_NFCShield_I2C folder contains Adafruit_NFCShield_I2C.cpp and
Adafruit_NFCShield_I2C.h

Place the Adafruit_NFCShield_I2C library folder your
<arduinosketchfolder>/libraries/ folder. You may need to create the
libraries subfolder if its your first library. Restart the IDE.

adafruit_nfcshield_i2c's People

Contributors

don avatar driverblock avatar justjoheinz avatar ladyada avatar mauromezze avatar microbuilder avatar paintyourdragon avatar peterk avatar pitkley avatar stampycode avatar stonehippo avatar tdicola avatar vergun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_nfcshield_i2c's Issues

Share a NFC tag with the library ?

Hey guys,

how about sharing tag with the Adafruit PN532 NFC/RFID Controller Shield ?

In the description, it's writtten :
This chipset is very powerful, and can pretty much do it all, such as read and write to tags and cards, communicate with phones (say for payment processing), and 'act' like a NFC tag.

Is there a way with your library to share a NFC tag ?

PN532 PowerDown

Hello !

I'm working on a project where I need to send data from an Android device to an Arduino through NFC.

Since we can't do that directly, my solutions was to just physically attach a MiFare Card to the shield and use it as an intermediary between Android and Arduino. Android writes to the card... Arduino reads from the card... user thinks it's magic... everyone is happy.

It works pretty well, but I have to power down the PN532 in order to write to the card while it's sitting on top of the shield coil.

So I created a disable() function that puts the PN532 in PowerDown mode, and an enable() function that wakes it up when I want to try reading a card.

If this is of value to the lib I would love to make a PR with my additions.

Version without irq ?

I need this version for older ino, but this one doesnt work like the seeedstudio version without irq

Bug in mifareclass_formatndef

I have a problem with formatting the card using NDEF records using the example sketch.
It worked only once (setting the URL of adafruit). When I try to reformat the card with other NDEF informaton (e.g. comment out the mail record), the sketch will print all success messages, but fail to actually write the card.

The card is correctly formatted. I can write the card using some Android tag apps, such as NXP Tag Writer, however I cannot reformat the card using the sketch. It is just that the old NDEF record remains.

Here is the output of the standard sketch:
Looking for PN532...
Found chip PN532
Firmware ver. 1.6

PLEASE NOTE: Formatting your card for NDEF records will change the
authentication keys and you will no longer be able to read the
card as a normal Mifare card without resetting all keys. Try to keep
seperate cards for NDEF and non-NDEF purposes.

Place your Mifare Classic card on the reader to format with NDEF
and press any key to continue ...
Found an ISO14443A card
UID Length: 4 bytes
UID Value: 0xFA 0x6F 0x44 0xE6

Seems to be a Mifare Classic card (4 byte UID)
Card has been formatted for NDEF data using MAD1
Writing URI to sector 1 as an NDEF Message
NDEF URI Record written to sector 1

Done!

No delay needed between Wire.read() after a Wire.requestFrom().

In the file "Adafruit_NFCShield_I2C/Adafruit_NFCShield_I2C.cpp" in the function wirereaddata(), there is a delay(1) (at the moment in line 985) in the for-loop when reading data.

That delay may be removed.
The data is put into a buffer by the Wire.requestFrom(). After the I2C bus transaction has finished, the Wire.read() reads data from that buffer. There is no need to have a delay to get data from a buffer.

No Timeout on ReadPassiveTarget - it limits possibilities

as ive read so far, there is no timeout (to return false) for the read passive target function, this is good for default feature, but a timeout is also needed for other things such as allowing a loop to continue to allow printing to lcd regardless of card input.

suggested behaviour:
if timeout specified in the perameters (brackets) :
nfc.ReadPassiveTarget(mandetoryStuff,int timeout in ms).
since there is no feature request on github, id like to file it here.
wonderful product but i need some more done to the code.. i can contribute if need be.

mifareclassic_WriteNDEFURI

For some reason (it's 1:15 am so i should stop looking at code), mifareclassic_formatndef has issues writing NDEF messages to sector 1 on the writable card I got with my NDFShield. I believe it has something to do with the block 0 authentication and formatting because when I edit out the below block of code, it works fine.

From: "//Try to format the card for NDEF data"
To "Serial.println("Card has been formatted for NDEF data using MAD1");" it works fine.

I'm not sure if it is specific to this card due to the way block 0 was setup on the card or not.

Side note, so I don't have to open another 'issue,' on readMifare, the uint8_t data array wasn't working as two lines but did as one (shown below);
uint8_t data[16] = { 'a', 'd', 'a', 'f', 'r', 'u', 'i', 't', '.', 'c', 'o', 'm', 0, 0, 0, 0};

Thak you for the code and libraries! I've been playing around with the PN532 all day and am loving it!

Matt

wrong coding? // upgrade

I think there is a mistake in the library regarding the key settings. It is said in the AuthenticateBlock function:

pn532_packetbuffer[2] = (keyNumber) ? MIFARE_CMD_AUTH_A : MIFARE_CMD_AUTH_B;

with the comment:

@param keyNumber
Which key type to use during authentication (0 = MIFARE_CMD_AUTH_A, 1 = MIFARE_CMD_AUTH_B)


I think it should be the other way around! That made me a lot of trouble until i found out! Still not too sure though xD.. I'm new too C++/Arduino.

Also I am new to Github. I have extended this library with an Increment, Decrement and Transfer function. Where can I post it, so that maybe it can be integrated to the library?

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.