Introduction: Telegram Bot With NodeMCU (ESP8266)
Need a bot to give notifications from your system? or do something just by sending a message? Telegram Bot is your solution!
In this tutorial, I will use Telegram Web and BotFather to make my bot.
Step 1: Create a Bot
I assume you have successfully logged into the web telegram. Do a few steps below and look at the picture above.
1. Type "botfather" in search box.
2. Select BotFather user
3. Tap the start button at the bottom of the screen
4. Type "/newbot" and send it
5. Type a name for your bot (e.g. Ardhi NodeMCU Bot)
6. Type a username for your bot (e.g. ardhi_nodemcu_bot)
7. Note or copy the token. The token will be used in the code.
8. Tap link of your bot (e.g. t.me/ardhi_nodemcu_bot)
9. Tap the start button at the bottom of the screen
Step 2: Code and Upload
1. Copy the code from here: Sketch
2. Paste it on the Arduino IDE
3. Change SSID, Password, and Token with yours
4. Plug the micro USB cable into NodeMCU
5. Plug the USB cable into your computer
6. Click the upload button and wait for it to finish
Step 3: Talk to Your Bot
Now your bot is ready. Try sending any text and enjoy conversations with your bot!