This project connects the Amazon Alexa voice assistance with Lego Mindstorms EV3, so that you as user can manage the Lego Hammer robot with your voice. You can command the robot to move forward, backward, left or right, but also you can make Lego Hammer to search for enemies and once it founds them to smash them with its hammer.
I started following the tutorials in the challenge (mission 1 to mission 4) and despite it was a bit hard for me as a newbie in this two environments I was energized and excited with the progress.
Then after that I started to think about the same functionality but patrolling and smashing things automatically, within a defined space. I also started to think about using the screen in Alexa Spot to show pictures that connect the user more with the story, besides using different voices to make the robot speak through Alexa device.
Skill was created in Alexa Skill Kit Console, defining the intents, slots and testing the skill in the test tab.
The movements are made in steps, that is the length of the track wheel. Speed can be set to fast, medium or slow.
When in patrol mode the robot moves and turns randomly within a square of 4x4 steps. The robot cannot go away the boundaries of this square.
When the robot finds an obstacle it stops and smash the enemy, asking in case the order is not already given.
The skill has as endpoint a lambda function that is an Alexa hosted skill function. it can be accessed in the Code tab of the ASK console.
The endpoint is developed in node JS, and there is one json document used to render an image in the alexa screen using APL.
The image is uploaded to the S3 and is accessed from Alexa Hosted skill.
The logs can be checked in Cloud Watch also accesible from Alexa Hosted skill code tab.
Visual Studio Code has been used to develop python application used to manage the EV3 Brick functionality.
With the EV3DEV extension the code can be deployed and executed in the EV3 Brick and the logs can be viewed in the console.
I have uploaded the code into a github repository.
These videos show the lego hammer in action.
- Skill launch and moving commands.
- Patrol mode and smashing enemies.
.
Comments