Introduction: Control the Balance Maze With Alexa
Control the balance maze with Alexa
Move the maze by voice.
First of all, please see the video.
It is a summary of operation.
- Talk to Alexa (Raspberry Pi + AVS)
- Start Skill
SAY: BARANSU MEIRO WO KIDOU SHITE
- Instruct Skill
SAY: 1 DO, UE NI SHITE
- Skill communicates with Raspberry Pi and throws a command
- Raspberry Pi moves servo motor
I will explain how to make it.
Step 1: Prepare Amazon Echo
Let's buy Amazon Echo.
As of January 2018, Amazon echo can not be obtained due to limited sale in Japan.
Therefore, I created an Alexa device using Raspberry Pi.
Step 2: Skill Settings
Set up a custom Skill.
1. Create Skills with Alexa Skills Kit
Amazon Alexa Skills Kit
Define four intents and one slot.
2. Custom Skill on IBM Cloud
You can use it for free by using the light account.
1) Configure Node-RED on the IBM Cloud.
2) Install (copy & paste) the flow.
Step 3: Hardware Preparation
Create a maze game.
1. Servo and servo folder
Servo uses Tower-pro SG90. Please refer to the URL for details. 3D data can also be downloaded.
2. Maze game (light stuff, made with styrene board)
3. Ball (Light stuff)
4. Raspberry Pi (using Raspberry Pi 3B)
Step 4: Connection
Connect the servo to the Raspberry Pi.
1. Align the direction of the servo.
Connect the upper line to GPIO 12 (32 PIN).
Connect the lower line to GPIO 18 (12 PIN).
2. LED that glows when Skill is activated
Connect an LED with 200 Ω to 330 Ω on the anode. GPIO04(7 PIN)
Connect Graund(9 PIN)
Step 5: Setting Up Raspberry Pi
Install the software on the Raspberry Pi.
Chattering is done with Rpi.GPIO installed in the standard.
Therefore, I will install pi-gpiod.
This is because the PWM output is stable.
sudo apt-get install pigpio python-pigpio python3-pigpio
Start the daemon
Install the library for pi-gpiod.
Install the dashboard library for debugging.
3. Creating flow Please import (Copy & Paste) the following files to Node-RED.
Deploy when you can copy normally.
Step 6: I Will Talk to You
Please pronounce to Alexa.
1. Speak as "Alexa, activate the balance maze".
When the skill is activated, the LED turns on.
2. You are in dialog mode and you can talk without saying a wake word.
3. Speak as "Once you speak up", the maze moves in the specified direction.
4. Speak as "Stop", maze stop.