During Re:invent 2020, AWS announced an official AWS IoT Edukit hardware device. The M5Stack Core2 is an ESP32 development kit loaded with a display, touchscreen, motion sensor and microphone. Everything is powered either using USB or the built-in battery. The device supports FreeRTOS and is validated through AWS Device Qualification Program.
The ESP32 features a dual-core processor with up to 240MHz with 520KB SRAM and 8MB PSRAM. Regarding connectivity, the EduKit supports 2.4Ghz Wi-Fi connections and dual-mode Bluetooth. For storage, you can use the internal 16MB flash storage or use MicroSD cards.
To display information, the included touchscreen display supports 320x240 pixels using the ILI9342C driver and touch control via an FT6336U controller. For audio, an 1W speaker is built in; as well as an SPM1423 PDM microphone. The included 6-axis IMU (MPU6886) helps for device orientation. For the usage with AWS IoT services, an ATECC608A Trust & GO secure element is bundled as well.
First Steps
AWS has example use cases in the AWS IoT EduKit Workshop and you can find the matching source code at Core2 for AWS IoT EduKit. These resources are great to show you the typical lifecycle events for AWS IoT services.
Baseline
Using the contents from the AWS IoT EduKit Workshop and GitHub sources, I created a simple baseline to bootstrap new prototypes using the M5Stack Core2 AWS IoT EduKit. Just clone the aws-edukit-example repository, flash the application to you device and you’ll see the unique device identifier together with the assigned IP address.
Prerequisites
You need to install esp-idf in v4.2
to build the sources.
$ > brew install cmake ninja dfu-util
$ > mkdir $HOME/esp
$ > cd $HOME/esp
$ > git clone -b release/v4.2 --recursive https://github.com/espressif/esp-idf.git
$ > cd esp-idf
$ > $HOME/esp/esp-idf/install.sh
Configuration
Using idf.py
you can configure the wifi credentials:
# Configure esp-idf
$ > . $HOME/esp/esp-idf/export.sh
# Clone Repository
$ > git clone git@github.com:sbstjn/aws-edukit-example.git
# Configure WiFi settings in "AWS Configuration" ( use "s" to save and "q" to quit )
$ > cd aws-edukit-example
$ > idf.py menuconfig
Build & Flash
# Build, flash, and monitor your application
$ > idf.py build flash monitor -p /dev/cu.SLAB_USBtoUART
Your device should restart and display information about the device identifier and assigned IP address.
Based on this, connecting to AWS IoT services is the next step. Soonish …