How to Install the Library
The M2X Arduino library depends on jsonlite. The installation steps are as follows:
1. Clone the jsonlite repository.
2. Open the Arduino IDE, click Sketch->Import Library...->Add Library..., then navigate to amalgamated/jsonlite folder in the cloned jsonlite repository. The jsonlite library will be imported to Arduino this way.
NOTE: If you cloned the jsonlite library, there will be 3 folders named jsonlite:
- jsonlite: the repo folder
- jsonlite/jsonlite: the un-flattened jsonlite source folder
- jsonlite/amalgamated/jsonlite: the flattened jsonlite source for arduino
3. The last folder is the one you should use — the first two won't work!
4. Use the instructions outlined in Step 2 above to import the M2XStreamClient library in the current folder from the M2X Arduino library.
5. Now you can find M2X examples under File->Examples->M2XStreamClient
The LilyPad website has a very good tutorial on setting up the LilyPad. It contains detailed instructions on how to install the Arduino IDE as well as connecting to your LilyPad. Feel free to proceed to the Arduino site to get a basic overview on how Arduino based boards work.
NOTE: On Mac OS X 10.9 if you are experiencing connection issues such as "programmer not responding" please see this thread.
Wifi/Ethernet Shield Setup
The LilyPad has no direct shield interface nor are the MISO/MOSI pins exposed to manually connect to the shields. Accordingly, there is no support for this connection at this point in time.
3g/Cellular Modem/Shield Setup
Since Serial RX/TX is exposed through the FTDI connection, the LilyPad can access the Internet through a compatible 3d/Cellular Modem using the M2X SerialModem library and connecting the Serial RX/TX lines to the Modem. Installation instructions can be found on the SerialModem GitHub page.