Learn how to connect your DHT11 (Humidity and Temperature Sensor) to received message on Telegram Account. While Temperature goes beyond a certain value, a buzzer alert is launched. You can use the messaging app to interact with your device.
You can view the last released Telegram API documentation here.
INSTALLINGStep 1 (TelegramBot Library)1. Download TelegramBot Library (Download).
2. To install library, open Arduino, Go To Menu: Sketch / Include Library / Add.ZIP Library... and Select your downloaded.ZIP file.
1. Install ArduinoJson & WiFi101 Library from Library Manager. Go To Menu: Sketch / Include Library / Manage Libraries.
2. Insert "ESP8266" then “ArduinoJson” in the textbox.
Step 1 (Create a new TelegramBot )
Be sure you have installed Telegram on your phone or your laptop, then, in the search bar, look for @botfather.
Talk to him and use the /newbot command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot.
The Name of your bot will be displayed in contact details and elsewhere.
The Username is a short name, to be used in mentions and telegram.me links. Your bot's username must end in ‘bot’, e.g. ‘tetris_bot’ or ‘TetrisBot’.
CONNECT HARDWARE.1. Connect your NodeMCU with the USB Cable and power same.
2. Connect the DHT11 pin as follows:
- DHT11(-) to any Ground(G) on the Node MCU. (Bottom)
- DHT11(+) to any 3Volt(3V) on the Node MCU. (Top)
- DHT11(Data) to D6 pin on the Node MCU. (Middle).
Yellow Cable – Negative DHT11 Green Cable – Data DHT11 Blue Cable – Positive DHT11
3. Connect the Buzzer pin as follows:
- Red Cable to D2 on Node MCU.
- Black Cable to Ground on NodeMCU.
RESULT.
Comments
Please log in or sign up to comment.