Dependencies:   PN532 mbed

Files at this revision

API Documentation at this revision

Comitter:
Zukya
Date:
Thu Jun 25 14:43:32 2015 +0000
Commit message:
projet test nfc

Changed in this revision

PN532.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r d12b57075751 PN532.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PN532.lib	Thu Jun 25 14:43:32 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/components/code/PN532/#26c1b3b6c192
diff -r 000000000000 -r d12b57075751 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jun 25 14:43:32 2015 +0000
@@ -0,0 +1,27 @@
+
+//#include <SPI.h>
+#include "PN532_SPI.h"
+#include "PN532.h"
+#include "NfcAdapter.h"
+#include "mbed.h"
+
+PN532_SPI pn532spi(SPI, 10);
+NfcAdapter nfc = NfcAdapter(pn532spi);
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+void setup(void) {
+
+    pc.printf("NDEF Reader");
+    nfc.begin();
+}
+
+void loop(void) {
+    pc.printf("\nScan a NFC tag\n");
+    if (nfc.tagPresent())
+    {
+        NfcTag tag = nfc.read();
+        tag.print();
+    }
+    delay(5000);
+}
\ No newline at end of file
diff -r 000000000000 -r d12b57075751 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jun 25 14:43:32 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file