Get Started Guide: USI Development Kit for ACK

This page moved to ../ack/dev-kit-get-started-guide.html.

This guide helps you set up Alexa Connect Kit (ACK) Development Board and Arduino Zero included in your ACK Development Kit. Later in the guide you'll attach an LED light to the dev board and use Alexa voice control or the Alexa App to turn the light on and off.

Prerequisites

In order to get started with this guide, you'll need the following items included in your ACK development kit:

  • The ACK Development Board

  • An Arduino Zero

  • A printed bar code

  • One micro-USB cable

  • One LED with internal resistor

  • An Amazon.com account and an Alexa developer console account to use for your ACK projects.

    • Your Amazon.com account must have the current country/region set to United States for content and devices. Set it at Your Account, Content and Devices, Preferences, Country/Region Settings.

You must also have the following hardware and software:

  • A desktop or laptop that can run the Arduino IDE

  • A 2.4-GHz wifi network for the dev board to connect to

  • (Optional) An additional micro-USB cable for debugging as needed

  • An Alexa-enabled device such as the Dot or Echo, signed into the Amazon.com account that you are using for your ACK projects

    or

    The Alexa Mobile App installed and running on your mobile phone, signed into the Amazon.com account that you are using for your ACK projects

    • On Android, you need the Alexa app version 2.2.238859.0 or later
    • On iOS, you need the Alexa app version 2.2.243227.0 or later

Power up your dev board

Before you can start using your dev board, you need to power it up.

  1. Make sure that the dev board is not connected to the Arduino Zero.

  2. Turn on the dev board by connecting a micro-USB cable to the board's micro-USB slot and to your computer.

    1. The power LED on the dev board turns red, indicating that the board is receiving sufficient power. If the LED isn't on, try a different power source or cord.

    2. The status LED turns white, indicating that the module is on, but not yet connected to your wifi network.

Set up the Arduino development environment

The Arduino Zero represents your host MCU for testing purposes.

Download and configure the Arduino IDE

  1. Download the Arduino IDE from https://www.arduino.cc/en/Main/Software and follow the setup instructions

  2. Run the Arduino IDE

  3. Install and update required libraries

    1. Open the Library Manager by going to Sketch > Include Library > Manage Libraries

    2. Install the CRC32 library: search for CRC32, select the latest version (Christopher Baker, version 2.0.0) and click install.

    3. Update all libraries: filter libraries by updatable and for each library, select and click update. There may be nothing you need to update.

  4. Configure your IDE to use the Arduino Zero board. For further instructions refer to the Arduino Zero Guide.

    1. Open the Board manager: Tools > Board > Boards Manager. 

    2. Find the Arduino SAMD Boards (32-bits ARM Cortex-M0+) by Arduino version 1.6.18 package and install it. Note that this step will take a few minutes, and may prompt you for some permissions.

    3. Select Tools > Boards > Arduino/Genuino Zero (Programming Port)

  5. Configure your IDE to use the correct USB port.

    1. Connect a micro-USB cable to the Arduino Zero's PROGRAM port and to your computer. To locate the PROGRAM port, see Understanding your Arduino Zero.

    2. In the IDE, select the port that your Arduino Zero is connected to: Tools > Port > (YOUR_PORT)

Import the host MCU reference implementation into your Arduino

ACK provides a reference implementation that you can use with your Arduino (and later with your own host MCU).

  1. Log in to the ACK Console, choose the Resources page, and download the following:

    Host MCU Reference Implementation.

  2. Unzip the reference implementation somewhere convenient, but do not put it in the Arduino libraries folder. Later steps move the Arduino files to the correct location.

  3. Follow the instructions for setup in Readme.txt.

  4. You now have subfolders in your Arduino IDE libraries folder that contain both Alexa Connect Kit library and code for you to use. The subfolders are named starting with AlexaConnectKit_.

  5. Restart the Arduino IDE to pick up the new example sketches.

Set up the Arduino Zero host MCU

In this procedure you program your Zero with code that handles an Alexa “turn on” directive.

  1. Verify that a micro-USB cable is connected to the Arduino Zero's PROGRAM port and to your computer. To locate the PROGRAM port, see Understanding your Arduino Zero.

  2. Verify that the Arduino Zero is selected as the board.

  3. Verify that the correct USB port is selected in the Arduino IDE. For more information, see Set up the Arduino Development Environment.

  4. Open the Power Controller example by going to File > examples > AlexaConnectKit_HelloWorld.

  5. Compile and upload the code to your Arduino Zero.

After you complete these steps, the Arduino IDE should say "Done uploading".

Connect the dev board and Arduino Zero

Now that your dev board and Arduino Zero are working as expected, connect them. This architecture emulates your production devices, where the ACK Connectivity Module on your ACK dev board connects to the host MCU via universal asynchronous receiver-transmitter (UART). In this case, the pins of the ACK dev board match the Arduino UART pins.

  1. Disconnect any USB cables.

  2. Physically connect the two boards by inserting the dev board pins into the headers in the Arduino Zero.

  3. Power the combined devices by connecting a USB cable to the Arduino Zero's PROGRAM port. To locate the PROGRAM port, see Understanding your Arduino Zero.

After you complete these steps, both devices have power and the LED status light on the dev board is green. 

Development Board and Arduino Zero connected
Development Board and Arduino Zero connected

Connect the LED Light to the Dev Kit

Now that your dev board and Arduino Zero are connected, you can add an LED light.

  1. Plug the LED into the headers in the dev board. The long pin goes into pin 8 and the short pin goes into pin 14 (GND).

    The dev board does not have labeled pin numbers, so see Understanding your ACK development board, or read the numbers on the corresponding Arduino Pins. Use the following image as a guide.

    Development Board and Arduino Zero connected, with LED light attached
    Development Board and Arduino Zero connected, with LED light attached

Register your dev board

Before you can use Alexa commands to control you dev kit, you need to register your device. For more information, see Register Your Product.

After you register your device, your dev board is connected to the cloud and Alexa systems. The status LED should be green. If any problems arise, see the troubleshoot the development kit guide.

Run your first project

In this section, you use Alexa to control the dev kit. You can use an Alexa-enabled device, or the Alexa Mobile App, to control your device. If any problems arise, see the troubleshoot the development kit guide.

To use an Alexa-enabled device, such as a Dot or Echo, do the following:

  1. Make sure you're signed into the Amazon.com account that you are using for your ACK projects.

  2. Say "Alexa, turn on my first plug" to your Alexa device. The LED light turns on.

  3. Say "Alexa, turn off my first plug" to your Alexa device. The LED light turns off.

To use the Alexa Mobile App to control your device, do the following:

  1. Open the Alexa mobile app and verify that you're signed into the Amazon.com account that you are using for your ACK projects.

    The first time you use the mobile app with this account, you must answer a few questions before you reach the home screen. You don't need to connect an Echo device to proceed.

  2. Navigate to the Smart Home section of your Alexa Mobile App.

  3. From the list of Smart Home devices, select your device named First Plug.

  4. Tap the plug icon to turn the light on and off.

When the LED light is on, you see the following.

Development Board and Arduino Zero connected, with LED light on
Development Board and Arduino Zero connected, with LED light on

Your first project is now complete, and you're ready to start prototyping your own device.

Next Steps

Now that you have finished your first test project, you can begin prototyping more advanced features. For more information, see Overview of the ACK Development Process.