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

Revision:
0:88960f3eeb2c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nfc/NdefMessage.h	Fri Dec 27 01:46:32 2013 +0000
@@ -0,0 +1,39 @@
+#ifndef NdefMessage_h
+#define NdefMessage_h
+
+#include <Ndef.h>
+#include <NdefRecord.h>
+
+#define MAX_NDEF_RECORDS 4
+
+class NdefMessage
+{
+    public:
+        NdefMessage(void);
+        NdefMessage(const uint8_t *data, const int numuint8_ts);
+        NdefMessage(const NdefMessage& rhs);
+        ~NdefMessage();
+        NdefMessage& operator=(const NdefMessage& rhs);
+
+        int getEncodedSize(); // need so we can pass array to encode
+        void encode(uint8_t *data);
+
+        bool addRecord(NdefRecord& record);
+        void addMimeMediaRecord(string mimeType, string payload);
+        void addMimeMediaRecord(string mimeType, uint8_t *payload, int payloadLength);
+        void addTextRecord(string text);
+        void addTextRecord(string text, string encoding);
+        void addUriRecord(string uri);
+        void addEmptyRecord();
+
+        unsigned int getRecordCount();
+        NdefRecord getRecord(int index);
+        NdefRecord operator[](int index);
+
+        void print();
+    private:
+        NdefRecord _records[MAX_NDEF_RECORDS];
+        unsigned int _recordCount;
+};
+
+#endif