Start Smart Life With IFTTT 1 | IoT Cloud Kit for microbit-MakeCode-Tutorial

0 1988 Medium

Introduction

Content

The big hit of IoT brings great convenience to our everyday life. For helping students better understand and apply IoT, we especially compiled this tutorial Playing with the IoT with micro:bit.

This tutorial goes with the products from the IoT Cloud Kit for micro:bit. It focuses on the design of class and the reference of knowledge points, which can help teachers better prepare for lessons. The whole tutorial is divided into five parts, a total of 15 class hours, 30 high-quality projects, covering the use of the IoT platform, smart city, smart life, scientific inquiry and other fields. The first part mainly gives an intro about how to use the three IoT platforms IFTTT, ThingSpeak, and Easy IoT; The second part will lead students to discuss and design IoT-related projects to deal with the commonly-seen problems in cities like noise, fire, parking and so on; The projects in the third part will be closely related to daily life, in which students can learn things about smart home by exploring topics about home safety, corridor light control, humidity detection, etc.; In the fourth part, students will get to know how to use IoT to analyze and collect experimental data through hands-on science experiment projects; the last part mainly describes the basic theories of the IoT.

The main contents of this tutorial are as follows:

The projects in the tutorial are based on actual applications. Through actual operations, primary and middle school students will be guided to fully understand the knowledge of the IoT, identify the applications of the IoT in life, and then use the IoT technology to change their lives.

What is IoT Cloud Kit for micro:bit kit

The IoT Cloud Kit for micro:bit provides an excellent solution to IoT classroom teaching for K8~K12 students and can be used on various IoT Platforms like IFTTT, ThingSpeak, Easy IoT, etc. Taking micro:IoT Board for cloud expansion board as the core, the kit comes with 10 external modules that meet teaching requirements to allow students to develop projects involving various functions like clock service, text display, sound playback, light switching, data collection and analysis, etc.

What is micro:bit

micro:bit is a microcomputer development board designed by BBC for teenagers’ programming education. With only half the size of a credit card, the board is equipped with a 5*5 programmable LED matrix, 2 programmable buttons, accelerometer, electronic compass, temperature sensor, Bluetooth module and other electronic modules. We will use it to do various interesting tasks later.

What is MakeCode

MakeCode, a graphical programming environment produced by Microsoft, brings computer science to life for all students with fun projects, immediate results, and both block and text editors(javaScript) for learners at different levels.

Lesson 1: Start Smart Life With IFTTT 1

Objectives

1. Learn what IFTTT is

2. Get to know how to use IFTTT

3. Use IFTTT to play with internet automation

Learning Process

Preparation

Teachers: computer/smartphone, good internet, IoT cloud kit.

Students: computer/smartphone, good internet, IoT cloud kit.

Learning Content

Lead-in: After entering the era of the Internet, it is necessary to simplify complex things and automate repetitive things so as to truly realize smart life.

Introduction to IFTTT

1. Lead-in

With the development of the Internet and the popularization of smart phones, people have also started up a new way of life, such as online car-hailing, online meal-ordering, and online payment. It seems that as long as you have a smart phone, many problems in life can be solved. Can this lifestyle be considered a smart life?

In my mind, smart life should be that if I open the door, then the lights in the hallway will be automatically turned on; if it’s time to eat, then the food ordering app will automatically make an order for the most favorite takeaway and deliver it to my location; if there will be rain tomorrow, a text message will be automatically sent to reminding the person I care about most not to forget to bring an umbrella when she goes out tomorrow. A true smart life should be like an induction faucet, where water comes out when the hand is stretched out, and water stops when the hand is moved away. Just let it go, no need for us to do anything deliberately.

Question: What is the smart life like in your mind?

2. What is IFTTT

If it is your first time using IFTTT, then there must be a lot of questions about it. What exactly is IFTTT? Simply put, it is a kind of service. If we want it to perform the corresponding task, we only need to set the conditions and actions separately, and then it will automatically check whether the conditions are met. Once the conditions are triggered, it will automatically execute the actions corresponding to the conditions. For example, "If A completes task 1, then let B complete task 2."

IFTTT is the abbreviation of If This Then That. In fact, it is to make your network behavior trigger a chain reaction and make it more convenient for you to use. Its purpose is "Put the internet to work for you". IFTTT aims to help people use the open API of various websites to monitor the Trigger set by users. If the Trigger is triggered, the Action set by the user will be executed. Usually, we can create multiple Applets to meet our various automation needs.

If This Then That

Question: Can the scene in lead-in be realized by IFTTT?

How to use IFTTT

To use IFTTT to realize Internet automation, we need to learn how to use it. First, we need to establish an account on IFTTT. Follow the steps below:

Sign up

1. Windows system browser access URL:https://ifttt.com/ to enter the homepage of IFTTT.

2. Click "Get started" in the upper right corner to enter the user sign up/login interface. (If you already have an account, you can directly click "Log in" to log in)

3. Click "sign up" on the web-page to enter the user registration interface.

4. Tick "Get updates for products available on IFTTT" and fill in the available email account and the password you want to set in the corresponding position. After that, click Sign up to complete.

5. After successfully logging into the IFTTT website, the following interface will be displayed.

When the account is successfully signed up, you need to create an Applet for the If This Then That. The next part comes to the interface of If This Then That.

1. Click "Create" in the upper right corner of the page to enter the interface of If This Then That

2. Get to know the If This Then That interface.

3. Next, we will learn how to create an Applet, follow the example below to operate it together.

Project Practice—Complete Internet Automation with IFTTT

In the previous section we learned what IFTTT is and how to use IFTTT. So, what can it be used to do? Next, we will lead you to complete your own automation tasks through some simple cases. The tutorial is mainly about the use of reminder, timing, and social services.

Task1: Reminder

Notifications is a reminder service provided by IFTTT. Through Notifications, we can completely customize various reminder tasks.

There are many task management tools on smartphones, and there are official "reminders" in the iOS system. Why do we need to use IFTTT's reminder service? There are two main reasons:

1. Make reminder conditions smarter.

IFTTT is a typical If This Then That service, so the conditions of the reminder service can be smarter. For example, if I use Twitter’s notification, I will get new messages from more than one person. But I only want to check messages from the person I care about. If IFTTT's reminder service is used, it can be specified to check only a certain person or a certain type of message.

2. Non-disruptive

If you use the task management tool on the smart phone (for example: reminders in the iOS system) for the reminder service, it will not be considered complete when the reminder message is received. We must modify the status of the task (completed or postponed), otherwise every period of time it will harass you. The IFTTT reminder message is pushed through the official app, there will be only one reminder record. Checking it means that it has been processed. It will not remind you all the time.

Next, we will experience the reminder service of IFTTT through real cases.

Twitter specific user posting reminders

If someone you like sends a new tweet on Twitter, IFTTT will push the tweet to you and remind you that the person you like has posted a new tweet.

The condition in this task is "if the person you like sends a new message on Twitter". Next, we will implement this automation task step by step.

Create a new automation task

First, we use If This Then That to create a workflow like the one shown below:

Create Trigger

1. Click "Create" in the upper right corner of the webpage to enter the interface of If This Then That.

2. Select Twitter, the service corresponding to Trigger, and you can find it by searching directly in the service. The steps are as follows:

3. Set the conditions of Trigger according to your own needs. Because what we want to achieve is that if the person you like sends a new tweet on Twitter, IFTTT will remind you, we select "New tweet by a specific user" and fill in the Twitter account of the specific user. The steps are as follows:

4. Click “Create trigger” to complete the setting. Then we continue to create Action.

Create Action

1. Select Notifications, the service corresponding to Action, and set the specific action "Send a notification from the IFTTT app" to push new tweets to the IFTTT app. The steps are as follows:

2. Set the Action template to remind you that someone sent a message, the content of the message is as follows: XXXX. There are some fixed notification message templates in IFTTT, which we can choose directly. As shown below:

3. Click Create action to complete the setting. Then we continuously click "Continue" → "Finish" to complete the creation of your first Applet. As shown below:

Operating Effect

When the person you like sends a new message, IFTTT will push a message reminder. As shown below:

Note: You need to install the IFTTT app on your mobile phone and log in to the same account as the web page.

Summary

Twitter specific user posting reminders is the first case in the IFTTT project, through which we can find that it is still very simple to establish an automated task through IFTTT. The Twitter service used in this case provides many trigger conditions. In addition to reminding specific users’ new tweets, many conditions can be set, such as:

1. Triggered every time you send a new tweet.

2. Triggered every time you send a new tweet with a # sign.

3. Triggered when you are followed by a new user.

4. And so on.

Question: Try creating a new automated task using other conditions in the Twitter service.

Task2: Timing

Date & Time is a timing service provided by IFTTT. It is a little similar to the alarm clock application on our phones, set a time and then it will remind us to do something. However, IFTTT’s timing service is a bit different. It can do some simple things for us automatically according to the rules we set when the set time comes. Next, we will experience the timing service of IFTTT through real cases.

Automatically create a diary template in Evernote

If you have the habit of writing a diary, will you have these troubles: 1. There are too many things today and don't know what to write? 2. Forgot to write. 3. Don't understand what you wrote before in the diary? If there is a template, would it be much more convenient to record the content according to the template every day? For example, a template like this:

As long as you answer the corresponding questions according to this template every day, you can complete the diary. Now, the first and third problems have been solved, how to solve the second problem?

Regarding forgetting to write a diary, we can set a simple reminder, mainly through IFTTT to realize the function of creating a daily template. After the creation is successful, IFTTT will automatically send a message to our mobile phone.

Create a new automation mission

Here, we first use Date & Time in IFTTT and Evernote to establish a workflow as shown below:

Create Trigger

1. Click "Create" in the upper right corner of the webpage to enter the interface of If This Then That.

2. Select the service corresponding to Trigger, here select the official Date & Time service, which can be found by searching. Then set the trigger condition of Trigger to "Every day at".

3. Set the Trigger condition according to our own needs. For the convenience of testing, we set the condition here as “3 pm every day”

4. Click Create trigger to complete the setting. Then we continue to create Action

Create Action

1. Select Evernote, the service corresponding to Action, and set the action condition "Create a note"

2. Add the diary template, set the title to "My Today" and save the settings in a notebook named diary, and set the label to diary.

Copy the diary template below to the Body.

3. Click Create action to complete the setting. Then we continuously click "Continue" → "Finish" to complete the creation of your Applet. As shown below:

There are two ways to make IFTTT App push notifications:

1. In the process of creating an Applet, enable IFTTT App push notifications: When you click "Continue", the following interface will appear, turn on the button "Receive notifications when this Applet runs"

2. After the Applet is created, open the IFTTT App push notification: Find the corresponding Applet, click to enter the setting interface of the Applet, and turn on the button "Get notifications when this Applet is active". As shown below:

Operating Effect

When the time is up, the IFTTT App will push a notification to remind you to write a diary, and a diary template is also created in Evernote:

Summary

In this case, we used Date & Time and Evernote to implement the automated task of "generating a diary template at 3 pm every day". This is also our first contact with Date & Time service. With it, we can achieve many automated timing tasks, such as:

1. Remind me to drink water regularly;

2. Automatically send new year greetings on Facebook on the first day of the new year;

3. Automatically send blessing messages to friends on their birthdays.

4. And so on.

Question: Try using Date & Time service to complete one of the above timing tasks.

Task3: Social Contact

Now, we all share our feelings on Facebook, Twitter, and Instagram. Sometimes we may delete the previously sent content for some special reasons. What if you want to remember the past after many years? Until then, you will be upset, if you would have a backup at that time, it would be so great. But it is impossible for us to manually backup every post. For convenience, we can use IFTTT to establish an automated workflow and back up all the content. Next, we will learn how to automatically backup messages posted on Facebook to Evernote through real cases.

Automatically sync content posted on Facebook to Evernote

If I post a new message on Facebook, it will automatically sync the message to Evernote.

Our condition in this task is "If you post a new message on Facebook", then we will implement this automated backup task step by step.

Create a new automated task

We first use Facebook and Evernote in IFTTT to establish a workflow as shown below:

Create Trigger

1. Click "Create" in the upper right corner of the page to enter the interface of If This Then That.

2. Select Facebook, the service corresponding to Trigger, and you can find it by searching directly in the service. And set the trigger condition as “New status message by you”。

3. Click “connect” to connect to the Facebook account, as shown below. After completion, continue to create Action.

Create Action

1. Select Evernote, the service corresponding to Action, and set the action condition "Create a note".

2. Set the content of the backup information, as shown below:

Copy the diary template below to the Body.

3. Click Create action to complete the setting. Then we continuously click "Continue" → "Finish" to complete the creation of your Applet. As shown below:

Operating Effect

When you post a new message on Facebook, the same message will be automatically synchronized in Evernote.

Summary

In this case, we used the two services of Facebook and Evernote to realize the automated task of "automatically syncing the content posted on Facebook to Evernote". On IFTTT, support for various social platforms is also relatively comprehensive, such as Instagram and Twitter. After studying the above case, you can synchronize the new information to another platform. By analogy, can information sent on one platform be synchronized to multiple platforms at the same time?

Question: Try completing the above questions, such as: sync the new information in Facebook to Instagram, and then synchronize the information in Instagram to Twitter. Establish a workflow in a logical sequence

Discussion

Summary

We have learned how to use IFTTT to complete Internet automation in three categories: reminder, timing, and social contact. For these three categories, the projects we listed all use IFTTT to complete the Internet automation between services and services. It is an automation task that is separated from the hardware. What should we do if we need to connect the hardware to IFTTT? In the next lesson, we will learn to use the Webhooks service to connect the IoT cloud kit to IFTTT, and combine the hardware to complete the project of making automation tasks.

License
All Rights
Reserved
licensBg
0