Inspiration
I have always enjoyed thinking of or creating things that children would enjoy. It gives me great joy to see a child having fun, especially with the Amazon Alexa.
What it does
Did you ever find the need to know the number of steps between two cities or places? Well now you can. This Alexa skill called How Many Steps tells you the average number of steps there are between two cities or places. For example, you can ask Alexa to tell you you the number of steps between London and Paris by saying:
"Ask How Many Steps there are between London and Paris"
Alternatively, you can just ask Alexa for a fact by saying:
"Tell me a fact"
This will tell you how many steps there are between two random states in the United States.
How I built it
The skill is written in Javascript and uses Google Maps Api for Node.js. I use the Distance Matrix API to make a request between two cities. The request needs two destinations and an API key and you are good to go. Here is an example of a Distance Matrix request between Washington and New York City. This request will return a JSON response which will tell me the distance between the two places.
From there I calculate the average number of steps using the distance supplied by the above API request. According to this website, the average number of steps per KM is 1320 steps
Challenges I ran into
There were many challenges in the development of this Alexa skill. I needed to find a way to make sure that if the user said something Alexa did not understand, Alexa would reply with an appropriate response.
Accomplishments that I'm proud of
I have not developed anything much in Javascript. I am proud to have researched and improved my skills in a different coding language, whilst also incorporating the use of Google API to do so.
What I learned
I have learned a lot in the development of this skill. I learned how to incorporate a Google API into my project. I worked on my first project in javascript. I also learned how fun it can be to develop a skill.
What's next for How Many Steps
Current the places or cities that are supported are in Europe and the United States. Perhaps I can expand this to include many different places all over the world. Another thing I would like to do is to create a guessing game. For example, users might ask How Many Steps to play a game and they would need to guess how many steps are between the cities. This is something that would add to the skill in order to entertain the users.
Built With
- amazon-alexa
- javascript
- node-googlemaps
Log in or sign up for Devpost to join the conversation.