By the end of this chapter, you will have installed the companion phone applications on your mobile device, cloned the necessary code repository, received certificates for connecting to AWS IoT using Espressif Alexa’s AWS account, and flashed the certificates to separate flash partitions on the Core2 for AWS.
In order to complete the authentication with Alexa, you will use Espressif’s companion app to provision the device’s Wi-Fi and provision the device with your Alexa account.
Download the ESP Alexa Phone App: iOS / Android
We recommend (optional_ for this tutorial) that you have the Amazon Alexa app available for iOS or Android - this is the same app used to provision most Alexa-enabled devices.
All the code for this tutorial is located in the Alexa_for_IoT-Intro
folder from the repo you cloned in the
Blinky Hello World
tutorial. If you have already cloned the repository locally, you can skip this section.
To clone the repo again from the PlatformIO CLI terminal window:
git clone https://github.com/m5stack/Core2-for-AWS-IoT-EduKit.git
For this tutorial, you will use the Alexa_For_IoT-Intro project. In your new VS Code window,
Core2-for-AWS-IoT-EduKit/Alexa_For_IoT-Intro
folder, and click open.
Next, you must open a new PlatformIO CLI terminal window in VS Code:
You must create the AWS IoT credentials to communicate with AWS IoT core. For this workshop and device, Espressif has provided AWS IoT credentials that can be used on their AWS account with the Core2 for AWS. To obtain the credentials for your device to connect to their service, fill out the form here .
After you receive the e-mail containing the credentials zip file, save the file and unzip the contents. After extraction, you will have a folder called espcredentials. With the device plugged in, you can upload these certificates to your device by entering the following commands in your PlatformIO CLI terminal window:
With everthing set up and ready, let’s move on to Building and Testing AFI .
AWS IoT Kit now features direct access to
M5Stack Forum
, which is a community-driven, questions-and-answers service. Search re:Post using the
Core2 for AWS
tag to see if your question has been asked and answered. If not, ask a new question using the Core2 for AWS
tag.