Telegram Control Application With Raspberry Pi

Step 1: Using of Telegram Bot API and RPI GPIO Modules

To write application code I used two modules for NodeJS. One of them is Telegram Bot API module and the other one is Raspberry Pi GPIO module.

Telegram Control Application With Raspberry Pi

Using Telegram Bot API you can create your own bot that can get/send messages to the other people on telegram. With this bot you can make so many interesting applications. Also I used this bot to do this application. You can find more details here about telegram bot API

Step 1: Using of Telegram Bot API and RPI GPIO ModulesTo create a new Bot you should talk with the Bot Father. Don’t worry it’s so easy. Just write him “/new bot” then after a while you will get your own bot and token number. And then you will be ready to use your bot in your applications. For more details about how to create a bot take a look here.

Step 2: Test Circuit and Running the Application

Step 2: Test Circuit and Runing the Application

To see application results on the GPIO pins I setup simple test circuit on the bread board. Above you can see the circuit.

To running application first of course you should install NodeJS and required files and modules. When application start to run it waits for the commands. For this app I defined basic few commands. These are gpio36read, gpio38high, gpio38low, gpio40low, gpio40high. These are also not case sensitive. Easily you can change or add more commands. If you send invalid command app alerts you. Also I added ID control to app. So, no body can’t controls or reads pins except you.

I did it with simple a line code which is below. If you want you can cancel it.

if( == “<Your Chat ID>”) { // app code here}

Scroll to Top
Scroll to Top
Read previous post:

The EE895 sensor module is ideal for use in climate measuring devices. Pressure and temperature compensation ensure a high CO2...