How to use IFTTT with micro:bit
Step 1. First you have to set up your network connection on the MuseLab micro:bit Booster. If you have already done so, please continue with “Step 2”, otherwise click below link and follow the instructions.
Step 2. Then you have to create an IFTTT account, if you haven’t done it yet.
Go to IFTTT at http://www.ifttt.com and signup.
Step 3. After signing in, Click “New Applet” at the right upper corner.
Step 4. To create a new applet, there are 2 things we need to set, which are “This” and “That” for IFTTT (If This Then That). Click on “This”
Step 5. For the service on “This”, we search and select “Webhooks”. “Webhooks” is an event and we need to set an event name to it . Let’s set the Webhooks event name to be “fire_accident” and click ”Create trigger”.
Step 6. After that, we set the “That”. We click “That”
Step 7. Now we will choose Gmail as an performing service when the “fire_accident” is triggered. From the next selection, action of choice is “send yourself an email“.
Quick review:
Let’s have a look what we did: If the fire_event happened, then trigger Gmail.
Of course, you can set different event and use different cloud services as you like!
Step 8. Now we need to get the API Key for our IFTTT account. Go to the upper menu and click “Search”, search for “Webhooks” and select it.
Step 9. You can see “Documentation” on upper right corner, click it!
Step 10. Now copy your personal API Key. Keep it confidential!
Step 11. Go back to the micro:bit block editor page. Get the “on button A pressed”-listener, find the Send IFTTT block from MuseIoT. Paste the key you have just copied from step 10. And type the event name you have just created in your IFTTT.
Make sure everything matches correctly!
* Be aware that no spaces (at the beginning and the end) of your copied IFTTT API Key.
** Be aware that the event_name is case-sensitive (capital letter or small letter must be the same). You can go to “My applets” to see if you not sure.