![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
M2M im2ag M2PGI
Dependencies: mbed X_NUCLEO_NFC01A1 NDefLib
Diff: main.cpp
- Revision:
- 6:67e0ae676619
- Parent:
- 5:b75a06d210fd
- Child:
- 7:536aa5009d53
--- a/main.cpp Tue Mar 15 14:58:29 2016 +0000 +++ b/main.cpp Tue Mar 22 12:55:52 2016 +0000 @@ -7,6 +7,7 @@ #include "NDefLib/RecordType/RecordURI.h" Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); +InterruptIn interrupt(GP0); /** * Write a Ndef URI message linking to st.com site. */ @@ -15,6 +16,10 @@ pc.format(8,SerialBase::None, 1); } +void tagDetect(){ + pc.printf("Detected !!! \n"); +} + int main(void){ init(); pc.printf("System Init now !\n"); @@ -36,7 +41,8 @@ //open the i2c session with the nfc chip if(tag.openSession()){ printf("Session opened\n"); - + interrupt.fall(&pressed); + nfcNucleo->getLed1()=1; //create the NDef message and record