
4.3.6
Alexa Voice Control
Voice control feature is added to the board by using Amazon Alexa. The developer can speak to an
Alexa-enabled device (for example, Echo Dot) to get the board sensor data or control LED LD2 color.
When the developer speaks to the Alexa-enabled device, the voice is streamed to the Alexa cloud for
processing and then sent the directives in JSON format to AWS Lambda. There is a Lambda function to
handle the directives. The directives include an access token which contains the mobile application
account ID. The Lambda function scans the table in AWS DynamoDB to look for the Device Thing ID that
belongs to the mobile application account ID. Then, the code in Lambda function updates the value to
AWS IoT Shadow or get the AWS IoT Shadow of the device to control the LED LD2 or report the sensor
data to Alexa cloud and output to the Alexa-enabled device.
There are two Alexa skills with different features for the Wi-Fi Smart Device Enablement Kit:
1.
Alexa Smart Home Skill - the name of this skill is Microchip Wi-Fi Smart Device Smart Home Skill.
2.
Alexa Custom Skill - the name of this skill is Microchip Sensor Board Skill.
The Lambda function source files of Microchip Wi-Fi Smart Device Smart Home Skill can be found in the
directory
/lambda-function/alexa-smart-home-skill
while the Lambda function source files of
Microchip Sensor Board Skill can be found in the directory
/lambda-function/alexa-custom-
skill
.
Table 4-1. Microchip Wi-Fi Smart Device Smart Home Skill
Function
Voice command
Turn On/ Off LED LD2
Turn on/ off <DEVICE_NAME>
Adjust light intensity of LED LD2
Set the power to [0 - 100]% on <DEVICE_NAME>
Table 4-2. Microchip Sensor Board Skill
Function
Voice command
Turn on/off LED LD2
Turn light on/off
Turn LED LD2 to different color
Turn light blue/green/red/yellow/white/cyan/magenta
Get LED LD2 color
What is the light color?
Get LED LD2 on/off state
What is the light state?
Get button (SW1, SW2, SW3) status
What are the button states?
Get temperature/humidity from the kit
What is the temperature/humidity?
Assert the Port A 17/ 20 or 21 GPIO to high/low
Set/Clear Port A 17/20/21
Assert the Port B 22/23 to high/low
Set/Clear Port B 22/23
4.3.7
Mobile Application Control
Mobile application controls the board by publishing MQTT message to Shadow MQTT
/update
topics, and
get the sensor data by subscribing Shadow MQTT
/update/delta
topics.
ATWINC15x0 Smart Device Kit
Application Firmware
©
2019 Microchip Technology Inc.
User Guide
DS50002885A-page 18