All Projects → alexa-samples → skill-sample-nodejs-buttons-hellobuttons

alexa-samples / skill-sample-nodejs-buttons-hellobuttons

Licence: other
Hello World buttons skill opens with buttons roll call and asks the user to push two buttons. On button one press, she changes the color to red and on button two press she changes the color to blue. Then closes. This skill demonstrates how to send directives to, and receive events from, Echo Buttons.

Programming Languages

javascript
184084 projects - #8 most used programming language

Hello Buttons Skill

Important: The Echo Buttons Skill API is in beta and is subject to change at any time without notice. We welcome your feedback.

These instructions show how to create a simple skill called Hello Buttons. This skill demonstrates how to send directives to, and receive events from, Echo Buttons.

Note: Hello Buttons demonstrates how to use the GameEngine and GadgetController skill interfaces. It is not intended to be a comprehensive example. For an end-to-end skill, please refer to the Color Changer sample.

This sample skill uses:

Hello Buttons Skill Flow

When the Hello Buttons skill begins, it will send animation directives for the three possible trigger events (buttonDown, buttonUp and none) to all the Echo Buttons. Alexa will then ask you to press the buttons, and an audio file will play.

When you press a button, the skill will interrupt Alexa's speech. If the button that you pressed is not awake, the skill will initialize the button by sending animation directives for buttonDown, buttonUp and none to that button. This is different from the original LaunchRequest intent, which sent initialization directives to all buttons.

If the pressed button wakes up, you will see a different color on buttonDown and buttonUp events, as well as a breathing animation for the none event. If you cancel the skill (for example, by saying "Alexa, cancel") or the Input Handler expires, the buttons will fade from white to black.

Preparation

Before you create the Hello Buttons skill, you must take the following steps:

  • Create an Amazon developer account If you don't already have an Amazon developer account, go to the developer portal and select Sign In in the upper right to create a free account.

Recommended

  • Get Echo Buttons This skill works best with two Echo Buttons, but you can also test using simulated buttons that will appear in the developer console.

Optional

Skill Architecture

Each skill consists of two basic parts, a front end and a back end. The front end is the voice interface, or VUI. The voice interface is configured through the voice interaction model. The back end is where the logic of your skill resides.

Three Options for Skill Setup

There are a number of different ways for you to setup your skill, depending on your experience and what tools you have available.


Additional Resources

Community

Tutorials & Guides

  • Voice Design Guide - A great resource for learning conversational and voice user interface design.
  • Codecademy: Learn Alexa - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on Codecademy!

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].