Skip to content

A simple wrapper for Telegram Bot READ/SEND operations.

License

Notifications You must be signed in to change notification settings

DeBoogie/ESP32-Telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-Telegram

A simple wrapper for Telegram Bot READ/SEND operations.

Installation

Example

#include <Arduino.h>
#include <Telegram.h>
#include <WiFi.h>

String chatId = "1234567890";
Telegram::Telegram telegram("3412604351:ABFopWfkL1fKu5_KmGfaA5DbRM9Gjey7uxs");

void setup()
{
  Serial.begin(9600);

  WiFi.begin("IoT", "");
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }

  telegram.sendMessage(chatId, "Starting up...");
}

void loop()
{
  vector<Telegram::Message> messages = telegram.readMessages();
  for (Telegram::Message message : messages)
  {
    Serial.println("[" + message.chat_id + "]: " + message.text);
  }

  delay(500);
}

About

A simple wrapper for Telegram Bot READ/SEND operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages