With this skill, kids can ask Amazon Alexa the current weather. The result will display on BBC micro:bit LEDs. This is a sample that connects Amazon Alexa and BBC micro:bit.
Application Id: amzn1.ask.skill.3d69813d-d47b-4cf7-8e79-af25b589b8f6Step 1 : Make Amazon Alexa Skill (Amazon Alexa herself. )
- Go to https://developer.amazon.com/edw/home.html#/skills/list and click "
Add a New Skill".
- Select Skill Type:
Custom Interaction Model, and input
Invocation Name, Click
- Input AWS Lambda ARN (See Step 2 : Make AWS Lambda), click
- Then you can test the skill, if you finish
Privacy & Compliance, you can
submit for Certification.
- Go to https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions?display=list ,and click
Create a Lambda function
Alexa Skills Kit, and click
Name, and copy the lambda source to the source area, and input the other fields, click
- In the next screen, click
- Then you will see ARN, fill the arn to Step 1's arn field.
- Go to http://openweathermap.org, and sign up a account, and you can find API key at your member page. Replace your app id by the key.
- Go to https://console.aws.amazon.com/sns/v2/home?region=us-east-1#/applications, click
Create platform application
Push notification platformto
Google Cloud Messaging(GCM), input
API key(You can get this key from firebase. See Step 5 : build for Android Device), click
Create platform application
- Now you can find the ARN, replace android source by this arn (if necessary, modify Region field to your region).
- Go to https://console.aws.amazon.com/sns/v2/home?region=us-east-1#/topics , click
Create new topic
Display name, then click
- You can find topic ARN, and replace lambda source and android source. (if necessary, modify Region field to your region).
- Go to https://console.aws.amazon.com/cognito/federated/?region=us-east-1 ,click
Create new identity pool.
Identity pool nameand check
Enable access to unauthenticated identities.click
- In the next screen click
- You will find the cognito ARN, and replace android source by this arn (if necessary, modify Region field to your region).
- Go to https://console.aws.amazon.com/iam/home?region=us-east-1#/roles , select your cognito role name such as Cognito_xxxxxUnauth_Role.
- Add SNS permission such as below picture.
- Go to https://firebase.google.com ,you can
Create new project,and you can find
CLOUD MESSAGINGtab. Fill this information to Step 4 : Send weather information to Android Device.
- Get the android source from https://github.com/tbchen/microbit-meets-alexa/tree/master/android
- Create firebase android app ,then download the google-services.json file from your firebase console, replace android source file.
- Use Android Studio import downloaded project, modify the arn information and firebase information, build app to android device.
- Go to https://pxt.microbit.org, add Bluetooth support, then click
- When you back to
Blocks, you will see like below picture.
- Transfer this program to micro:bit. and DONE!