Skip to content

Instantly share code, notes, and snippets.

@don
Last active December 17, 2015 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save don/5597085 to your computer and use it in GitHub Desktop.
Save don/5597085 to your computer and use it in GitHub Desktop.
Code for NFC slides - Maker Faire Bay Area 2013
cd ~/Documents/Arduino/libraries
git clone git@github.com:adafruit/Adafruit_NFCShield_I2C.git
git clone git@github.com:don/Ndef.git
NfcAdapter nfc = NfcAdapter();
void setup(void) {
nfc.begin();
}
if (nfc.tagPresent()) {
NdefMessage message = NdefMessage();
message.addTextRecord("hello, world");
nfc.write(message);
}
if (nfc.tagPresent()) {
NfcTag tag = nfc.read();
tag.print();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment