Recently, we wrote about how to connect a Raspberry Pi to AWS IoT and talked about how connecting hardware to the cloud can enable richer and more meaningful customer experiences. In this guide, we’d like to continue demystifying the process of connecting IoT devices to popular cloud services by helping you learn how to connect an Avnet MaaXBoard to Azure IoT.
Throughout the guide, we’ll look at everything from the hardware and equipment you’ll need to how to connect your MaaXBoard to the cloud. Whether you’re an experienced engineer or complete beginner, this guide should cover all you need to know to get started with IoT devices like the Avnet MaaXBoard in Microsoft Azure!
Project Materials
The first thing to do before you dive into an IoT project is to make sure you have all the materials you’ll need in order to complete it. To finish this project, you’ll need some specific hardware and some software.
Required Hardware
- The Avnet MaaXBoard (i.MX8M) which has 2GB RAM and a comparable GPIO configuration to a Raspberry Pi
- A USB keyboard
- A USB mouse
- A monitor and HDMI Mini (Type C) cable to plug into the MaaXBoard. If your monitor also has an HDMI port then you can use this one
- A 5V/3A USB Type C power supply cable to power the MaaXBoard like this one
- At least one 16 GB micro SD card – Here is a relitively cheap option for getting three
- A microSD card reader for your computer
- A breadboard, LED light, jumper wires, and resistors which you can get inside of a kit like this one
Here are a few other options for starter kits:
- https://www.newark.com/adafruit/955/starter-pack-raspberry-pi/dp/44W3510
- https://www.newark.com/adafruit/965/budget-pack-raspberry-pi/dp/44W3511
Required Software and Accounts
In addition to this hardware, you’ll also need:
- An Azure Subscription. You can create one for free here. When you create the account make sure you store your credentials somewhere as we’ll be doing a lot in Azure later in this tutorial.
- The OS Image to flash to the SD card and software that we can use to flash the image to the microSD card. I’ll be using Etcher to do the flashing which you can download for free. We’ll get the OS Image in the next step.
With all this hardware and software ready to go we can start by flashing our microSD card!
Flashing Your MicroSD Card
The first step to using the MaaXBoard will be to create a MicroSD card with a specific operating system image compatible with the Avnet MaaXBoard. To do this, we’ll need to download the image and use Etcher to flash the image onto our SD card.
Downloading the Image
You can download the Debian image from the MaaXBoard manufacturer website here.
Look under the Reference Designs section and click the option to download the Debian Linux Out of Box Image.
After you download it you will need to unzip and unrar it. On a Windows machine, you can do this with the 7-Zip Program.
On Linux or Mac you can use the unzip command:
unzip 91200026-MaaXBoard-LinuxShipmentImage-Debian-V1.1.1r10.rar.zip
And then you can unrar it with the unrar command. If you don’t have unrar already you might need to install it:
- On Linux with Sudo apt-get install unrar
- On a Mac machine using Brew: brew install unrar
With unrar, you can run:
unrar e 91200026-MaaXBoard-LinuxShipmentImage-Debian-V1.1.1r10.rar
At the end of this process you should then have an .img file with a name like this:
MaaXBoard-LinuxShipmentImage-Debian-V1.1.1r10.img
Flashing the Card with Etcher
With this .img file you can now use Etcher to flash the MicroSD card. If you haven’t already, download Etcher and then put your MicroSD card into your MicroSD card reader and plug it into your computer.
With the SD card plugged in, open Etcher and select Flash from file: