to colorize a colorful pixel with a simple touch using nfc technology
Dependencies: Chainable_RGB_LED mbed
use Arch, NFC Shield and Grove - Chainable RGB LED to DIY a touch pixel. Then use an Android with NFC support to colorize it.
The project is on https://github.com/Seeed-Studio/TouchPixel
Diff: nfc/NfcTag.h
- Revision:
- 0:88960f3eeb2c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nfc/NfcTag.h Fri Dec 27 01:46:32 2013 +0000 @@ -0,0 +1,33 @@ +#ifndef NfcTag_h +#define NfcTag_h + +#include <stdint.h> +#include <NdefMessage.h> + +class NfcTag +{ + public: + NfcTag(); + NfcTag(uint8_t *uid, unsigned int uidLength); + NfcTag(uint8_t *uid, unsigned int uidLength, string tagType); + NfcTag(uint8_t *uid, unsigned int uidLength, string tagType, NdefMessage& ndefMessage); + NfcTag(uint8_t *uid, unsigned int uidLength, string tagType, const uint8_t *ndefData, const int ndefDataLength); + ~NfcTag(void); + NfcTag& operator=(const NfcTag& rhs); + uint8_t getUidLength(); + void getUid(uint8_t *uid, unsigned int uidLength); + string getUidString(); + string getTagType(); + bool hasNdefMessage(); + NdefMessage getNdefMessage(); + void print(); + private: + uint8_t *_uid; + unsigned int _uidLength; + string _tagType; // Mifare Classic, NFC Forum Type {1,2,3,4}, Unknown + NdefMessage* _ndefMessage; + // TODO capacity + // TODO isFormatted +}; + +#endif