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 RedBoard website has a very good tutorial on setting up the RedBoard. It contains detailed instructions on how to install the Arduino IDE which is used to program the RedBoard as well as how to connect to the board.
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
To send data to the AT&T M2X service, or receive data from the AT&T M2X service, your RedBoard board needs a connection to the Internet. Hence an Arduino Wifi Shield or Ethernet Shield is needed to give your board the ability to connect to the Internet. To install the shield, hook the shield on your Redboard board — you can use the pins on the shield the same way as the real pins on the Arduino boards.
3g/Cellular Modem/Shield Setup
To send data to the AT&T M2X service, or receive data from the AT&T M2X service, you may also use a compatible 3d/Cellular Modem with the M2X SerialModem library. Installation instructions can be found on the SerialModem GitHub page.