Sample Code for the Alexa Gadgets Toolkit
To get started with the Alexa Gadgets Toolkit, see the following sample code:
-
Alexa Gadgets Raspberry Pi Samples – This GitHub repository contains resources that you can use to build gadgets that a skill can control using the Custom Interface Controller. There are two sample skills in Node.js and Python, as well as Python client-side code that you can use with both the Node.js and Python sample skills.
-
Alexa Gadgets Embedded Sample Code – This GitHub repository contains the protocol buffer files for the Alexa Gadgets Toolkit interfaces.
-
Handle Events – This topic contains sample code that shows how to validate the fields of a custom event.
-
Handle Directives – This section shows how to parse a custom directive that the gadget receives.
-
Example of Serializing and Deserializing Data – This topic contains sample code that serializes (encodes) and deserializes (decodes) directives and events for each Alexa Gadgets Toolkit interface using protocol buffer format. The sample code uses a C language implementation, but you can extend the concepts to other languages such as Python or Java.
Last updated: Feb 14, 2022