Molemi IoT
  • Space farming using food computers for sustainable farming
  • Introduction to Arduino
    • Introduction to Electronics
    • The Breadboard
  • Controlling LEDs with an Arduino
    • The Code
    • Adding a button to control the LEDs
      • The Code
  • Introducing Sensors
    • The CO2 and air quality sensor
    • The Code
      • Explaining the Code
    • Light Intensity Sensor
  • Introducing the NodeMCU
    • Getting Started
      • A simple test for ESP8266
        • The Code
    • A light bulb switch using NodeMCU and the Blynk app
      • Setup Blynk on your Smartphone
      • The Code
    • Controlling a Centurion gate Motor with NodeMCU a 2-channel relay
      • Installing Blynk in Arduino IDE
    • Read and display the water flow sensor on Blynk
      • Setting up Blynk
      • The Code
        • Explaining the code
    • Read and Display temperature sensor readings with NodeMCU.
      • Installing libraries for DS18B20 temperature sensor.
      • Displaying the sensor readings on the serial port
        • Getting temperature readings from different DS18B20 sensors.
          • The Code
            • Display sensor readings on a web server
              • Build the web server
                • Designing and building the web page
                • The Code
    • Display the DHT11 sensor reading on a web server using NodeMCU.
      • Monitoring Room Temp & Humidity using Blynk
      • Installing DHT library on the ESP8266
        • Installing the Asynchronous Web Server library
          • The Code
          • Designing and building the web page
  • Data Science for Farming
    • Getting Started with Colaboratory
    • Introduction to Python for DS using Colab
  • Machine Learning for Farming
  • Molemi Personal Food Computer
    • Bill of Materials
  • Setting up WaziGate on a Raspberry Pi
  • Setting up DHT11 on Raspberry Pi
  • Using Telegram To Control Outputs
Powered by GitBook
On this page

Was this helpful?

Using Telegram To Control Outputs

In this project we will be using NodeMCU and Telegram to control output devices such as the built-in LED of the NodeMCU board.

PreviousSetting up DHT11 on Raspberry Pi

Last updated 4 years ago

Was this helpful?

In this project we will be creating a Telegram bot that will be used in conjunction with the NodeMCU board to control the output devices which is the built-in LEDs.

These are the following tasks that need to be completed in this project:

  • Create a Telegram bot for the ESP8266 board.

  • You can start the conversation with the bot.

  • When you send message /led_on to the bot, the ESP board receives the message and then it turns on the GPIO 2.

  • similarly, when you send the message /led_off it turns GPIO 2 off.

  • You can also send the message /state to request the current GPIO state.

Create A Telegram Bot:

Step 1: The first thing that you will need to do is to go to the Google Play Store and download the Telegram Messenger App.

Step 2: Open Telegram and search for Botfather as shown below.

Once you click on the bot, you will get the following screen:

Step 3: