Skip to content

2.1 Setup your Cat M1 Development Kit

GilbertOppy edited this page Jun 1, 2018 · 56 revisions

Starting from Scratch

There are a few things you'll need to download, install, and setup to start playing with your Cat-M1 Telstra Development Board. The board is programmed using the Arduino IDE environment as an Adafruit Metro M0 Express.

  1. The best place to start is the Adafruit guide here (this shouldn't take much longer than 10 minutes - depending on your internet connection). By the end of this you should have:

    • Downloaded the Arduino IDE
    • Installed the correct Arduino Board-managers in the IDE
    • Installed the Driver software for the device
  2. Once the IDE is downloaded and installed, you'll need to install a few packages. Do this by opening the Arduino IDE and heading to: (as seen in the following setup)

    • Go to File -> Preferences

    • Head over to Tools -> Board -> Boards Manager, there should be a number of drivers now available to you, you will need to install the following

      • Arduino SAMD Boards version 1.6.15 or later (look for Arduino SAMD Boards (32-bits ARM Cortex-M0+) by Arduino)
      • Adafruit SAMD package (look for Adafruit SAMD Boards by Adafruit)
    • Quit and then reopen your IDE

    • Select Metro M0 Express from Tools -> Board menu (look under the Adafruit section)

Note: this is a good guide if you get stuck with the above

  1. It's now time to get that device up and running.

a) Starting with the device... Base Board

b) Twist the antennas into the SMA ports (easy to do, but be careful nonetheless!) Antennas

c) Flip the board over and slide the micro sim into the Simcard holder. Note the direction indicated for the SIM, it can only go in one way SIM tray

d) Plug in the USB as shown... USB connected

e) Then flick the on/off switch and you should see a few LEDs come on. Give it a couple of seconds... Lights

LEDS

The LED in between the ON/OFF switch and the battery terminal indicate whether the device is getting power.

The set of 3 coloured LEDS refer to the Cellular Network Status of the BG96 Module (ie: Whether you will be able to connect to the internet):

i) RED = POWER to the BG96 Module.

  • When Light is on solidly, the module is getting power

ii) BLUE = MODE.

  • If this is flashing fast then data is being sent, if it is a slow flash then the device is registered in the network.
  • If this is not flashing then there may be a problem with connectivity.

iii) GREEN = STATUS. Indicates Loading and Power State

  • Bright Means the module is fully active
  • Dull Green indicates that the module is booting.

The two LEDS labelled Tx and Rx indicate when the device is talking to your computer.

The LED affectionately labelled as 'BLINKY' can be used for testing (in particular, when running the test example 'Blink')

Using the IDE

Head on over to the Arduino IDE and check to see that the board has come up.

  • Go to Tools -> Port

    • You should see a list of Ports (often Port 3, Port 4 and Port 5), and then a Port labelled (for example) COM74 (Adafruit Metro M0 Express). Click on this one to select it to load code onto, and now we are ready to go with...

CODE TIME 🔢

You should now be ready to start writing some code. We recommend you spend some time with the Arduino reference pages, which have all the information on the standard builtin libraries and other helpful functions. Of course, you might find you end up at the reference pages by Googling "how to [x] Arduino"!

If you've not developed with Arduino before you could run a few Arduino examples at this point to get familiar and check your board is working, or continue below to add the custom Cat-M1 libraries and examples needed for the challenge.

There are a few custom libraries you'll need to download to make the board work, and examples to showcase all the functionality available to you. You can find them here, or just download the zip file for the repository and grab them from there. After you've got a local copy of these libraries you'll need to add them to the Arduino IDE's libraries directory. Adding custom libraries can be a bit tricky first time around so definitely check out the reference pages if you need a place to start, or get stuck. All the custom libraries are in Telstra Libraries folder, with the three that you need (TelstraIoT, TimeMaster and MMA8452) found here. Unzip the zip file you've downloaded, and you should have two folders, 'Telstra Libraries' and 'Telstra Examples'. Go to the directory where the arduino IDE executable sits and you should see an 'Examples' folder and a 'Libraries' folder. Place the Telstra Libraries into the Libraries folder and the Telstra Examples into the Examples folder. The IDE will import the libraries for you, and some examples that use the custom libraries.

Once you have the development environment working it's a good idea to check that your board is working too. Try one of the basic intro sketches built into the Arduino IDE by going File -> Examples -> 01 Basics. The blink example is good one, with our friend 'Blinky' getting its first use. Build and load this onto the board by pressing the Upload arrow Blink

You can be fairly sure everything is in order if you can get the blink example up and running (This is Sanity Check ver.1).

From there, we recommend you try and run the HardwareTest example (number 6 from the Telstra Examples), to test out your Cellular Connection, GPS, ability to ping google, etc (Sanity Check ver.2, ver.3, ver.x all conveniently rolled into one).

Go to File -> Examples -> TelstraIoT -> 6. Hardware Test and this will open up a new IDE window with this particular example script. Load this onto the board and then open up the serial monitor by going to `Tools -> Serial Monitor'. You may need to change ports a couple of times but then, after pressing the user button on your device to step through the various parts of the code, you should get the following print out. Hardware Test

If you've got this far, well done, you're over the hill and ready to start doing some end-to-end IoT data collection. Let's go to Preparing your IoT platform