A temperature alarm through Thingspeak and IFTTT
Purpose of this project:
With the Micro:bit board and ESP8266 module connected to the Internet of Things (IoT: Internet of Things), it is possible to track the temperature and humidity measured by the DTH11 sensor in real time.
To create applications for recording sensor data, one can use ThingSpeak which is an API and open source application for the Internet of Things, allowing to store and collect data from connected objects.
Material List :
BBC micro:bit
- ESP8266 serial wifi module
- A wifi network
- GPIO card
- Connection wires
- A test plate
- A temperature sensor
- Micro:bit power module
- step 1 : Connect the micro:bit to the Wi-Fi
- Connecting Wi-Fi is the very first step to access internet services, including ThingSpeak, IFTTT, email, etc.
- Before you start, make sure your micro:bit device is connected to the Internet.
** Open the Home Router or Mobile Phone Hotspo
*Please sure there is a Wi-Fi signal (with 2.4GHz) available in your area.
*5GHz Wi-Fi signal is not supported
** Assembly:
*A 3.3V power supply is necessary (200-400 mA at least), the USB power supply of the micro:bit card alone is not sufficient to operate the ESP8266 module properly .
** Programming (Makecode) :
we have added IOT Package
Enter your Wi-Fi name and password
Note: You can add a test on the connection to WiFi to ThingSpeak:
- Step 2 : Upload Data to ThingSpeak :
ThingSpeak can deal with HTTP request, save and process data. This platform has function as open application, real-time data collection, location data, data processing, visualization, device status information and plug-in. It can integrate many hardwares and software platforms like Arduino, Raspberry Pi, social network and MATLAB data processing.
** Create an account on ThingSpeak.com to create a new data string that will receive the temperature in its first field :
Click on “MY Channels” and click on New Channel for your new project.
Click on API KEY, parameters as below be showed:
step 3 :Program the Micr:bit board with the blocks to connect to the available WiFi and send the temperature to the ThingSpeak platform.
Coding
Assembly
step4 :The second part: Use the IoT kit to male a temperature alarm through Thingspeak and IFTTT.
IFTTT is the way to connect hundreds of the apps and devices, including Twitter, Dropbox, Email, Google Assistant, etc. By the basic programming logic “if this then that”, it connects IoT services through their API (application programming interface).
In IFTTT, you can make your own applet and link services together by “if this(trigger) then that(action)”. For example, if we select webhooks (micro:bit button A) as trigger, Email (send email to your mailbox) as action. When micro:bit button A is pressed, it triggers (webhooks) and implement the action (send email) in IFTTT.
Register an IFTTT Account
Go to http://www.ifttt.com, register an account and login to the platform
IFTTT Webhooks Setting
slelct " that" 
Open your web browser, open the top right menu, select “My services” > “Webhooks”
Step 5 : Thingspeak Setting
upload your temperature data from micro:bit to Thingspeak
create a a new ThingHTTP service
Note: URL is the link of web request, which has to include a Private Key provided by IFTTT. Content type must be JSON, because the expected format od IFTTT Maker Channel is JSON. Within Body, you can invoke any data in Channel. This is the data that is going to be sent to IFTTT with the format : {“value1”:”%%channel_138112_field_1%%”} .
Step6 : create a React service
Finally : We can see from the data of Thingspeak channel that the temperature has equal to 30m degrees.
Internet of Things - 20 minutes
- Definition
- What is a Thing in IoT?
- Classification of Things
ThingSpeak - 20 minutes
- What is ThingSpeak?
- Create an account on ThingSpeak.
Activity - 70 minutes
To publish sensor data on the cloud for monitoring application using an evive & ESP8266:
- Create a channel on ThingSpeak.
- Connect ESP8266 to evive.
- Explore the IoT blocks in PictoBlox from the Internet of Things Extension.
- Creating the program in evive.
- Uploading and debuging.
iot en general
matreil , microbit
Thingspeak and IFTTT.
link : https://www.elecfreaks.com/learn-en/microbitKit/iot_kit/how_to_use_IFTTT.html
Commentaires
Enregistrer un commentaire