RedBoard Arduino Setup Tutorial


The RedBoard is an Arduino based device and as such uses the M2X Arduino library to send/receive data to/from AT&T's M2X service.

Getting Started

  1. 1 Signup for an M2X Account.
  2. 2 Obtain your Master Key from the Master Keys tab of your Account Settings screen.
  3. 3 Create your first Device and copy its Device ID.
  4. 4 Review the M2X API Documentation.
  5. 5 Obtain a RedBoard and use a Wifi/Ethernet Shield or a 3g/Cellular Modem Shield and set it up.

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

Board Setup

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.