IoT Push Notification Using Rain Sensor With MicroBit

by Alhamed in Circuits > Microcontrollers

678 Views, 1 Favorites, 0 Comments

IoT Push Notification Using Rain Sensor With MicroBit

IoT Push Notification Rain Detection

So many useful applications can be done with the rain/water sensor, in this tutorial, you will learn how to use both of rain sensor and the wifi module to send push notifications to your telegram app 💦🚨

Supplies

X12.png

Connection

Circuit Diagram.jpg

By following the diagram above:

  • Connect the grove wifi module to P15 and P16
  • Connect the rain sensor to P0

Code

microbit-screenshot .png

Now, connect your REKA:BIT to your device and open MakeCode editor to start programming.

  • Add “ESP8266 Cytron” extension and follow the code block in the picture above
  • After completing the code, download it on microbit

You can also view and edit the code by clicking here!

Send Message to Telegram

Follow the steps here to create a Telegram bot, get the API key of the Telegram bot and the chat ID.

If you want to learn more on how to send messages to Telegram, please check the video tutorial here

Project Complete

Screenshot (261).png

Upon completing the project successfully, you shall receive a message notification on your Telegram application when the rain sensor gets wet.