#include "CTBot.h"
CTBot myBot;
String ssid = "Wokwi-GUEST";
String pass = "";
// Telegram token and chat ID
String token = "6526233059:AAEvRvy_mnQTNtGS2AUZhETqu9d7kZ-6jVU" ;
const int id = 5140501370 ;
char key ;
const int ROW_NUM = 4; //four rows
const int COLUMN_NUM = 4; //four columns
char keys[ROW_NUM][COLUMN_NUM] = {
{'1','2','3', 'A'},
{'4','5','6', 'B'},
{'7','8','9', 'C'},
{'*','0','#', 'D'}
};
void setup() {
Serial.begin(9600);
myBot.wifiConnect(ssid, pass);
myBot.setTelegramToken(token);
if (myBot.testConnection()) {
Serial.println("Connection Successful");
}
}
void loop() {
char key = keypad.getKey();
String message = String(keys) ;
Serial.println(message);
myBot.sendMessage(id, message);
if (key){
Serial.println(key);
}
}