国产chinesehdxxxx老太婆,办公室玩弄爆乳女秘hd,扒开腿狂躁女人爽出白浆 ,丁香婷婷激情俺也去俺来也,ww国产内射精品后入国产

電子發(fā)燒友App

硬聲App

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示
創(chuàng)作
電子發(fā)燒友網(wǎng)>電子資料下載>電子資料>使用Wemos D1 Mini使用Telegram應(yīng)用程序進(jìn)行智能家居控制

使用Wemos D1 Mini使用Telegram應(yīng)用程序進(jìn)行智能家居控制

2022-12-29 | zip | 0.00 MB | 次下載 | 免費(fèi)

資料介紹

描述

Telegram bot 是應(yīng)用程序編程接口或也稱為“API,它允許程序員在本教程案例中同時(shí)集成兩個(gè)不同的應(yīng)用程序,稱為帶有 ESP8266 的聊天應(yīng)用程序 Telagram。

由于 TelegramBOT API 令牌的存在,它可以連接在電報(bào)聊天和硬件系統(tǒng)之間,例如,它將集成在使用 Arduino IDE 編程的迷你 Wemos D1 與此應(yīng)用程序之間。

該項(xiàng)目使用了電報(bào)機(jī)器人 API 和 Wemos,將用于制作智能家居來控制燈和門。

1. 安裝 Telegram 機(jī)器人庫

2.源代碼

#include 
#include 
#include 
#include 
Servo myservo;
char ssid[] = "KAMAR KOS 7";     // your network SSID (name)
char password[] = "dasarlemahkaunak"; // your network key
#define BOTtoken "883873080:AAGkP-oNlzMgOS44X1jhE43C0_9JwwMCBPw"  // your Bot Token (Get from Botfather)
WiFiClientSecure client;
UniversalTelegramBot bot(BOTtoken, client);
int Bot_mtbs = 1000; //mean time between scan messages
long Bot_lasttime;   //last time messages’ scan has been done
bool Start = false;
  
const int ledPin1 = 0;
const int ledPin2 = 2;
int ledStatus = 0;
void handleNewMessages(int numNewMessages) {
 Serial.print("status pesan = ");
 Serial.print(String(numNewMessages));
 Serial.println(",pesan berhasil diterima\n");
 for (int i=0; i   String chat_id = String(bot.messages[i].chat_id);
   String text = bot.messages[i].text;
   String from_name = bot.messages[i].from_name;
   if (from_name == "") from_name = "Guest";
   if (text == "/led1on") {
     digitalWrite(ledPin1, HIGH);   // turn the LED on (HIGH is the voltage level)
     digitalWrite(ledPin2, LOW);
     ledStatus = 1;
     bot.sendMessage(chat_id, "Led 1 is ON", "");
   }
   if (text == "/led1off") {
     ledStatus = 0;
     digitalWrite(ledPin1, LOW);    // turn the LED off (LOW is the voltage level)
     bot.sendMessage(chat_id, "Led 1 is OFF", "");
   }
   if (text == "/led2on") {
     digitalWrite(ledPin2, HIGH);
     digitalWrite(ledPin1, LOW);// turn the LED on (HIGH is the voltage level)
     ledStatus = 1;
     bot.sendMessage(chat_id, "Led 2 is ON", "");
   }
   if (text == "/led2off") {
     ledStatus = 0;
     digitalWrite(ledPin2, LOW);    // turn the LED off (LOW is the voltage level)
     bot.sendMessage(chat_id, "Led 2 is OFF", "");
   }
   if (text == "/alloff") {
     digitalWrite(ledPin1, LOW);
     digitalWrite(ledPin2, LOW);    // turn the LED off (LOW is the voltage level)
     bot.sendMessage(chat_id, "All led is OFF", "");
   }
   if (text == "/allon") {
     digitalWrite(ledPin1, HIGH);
     digitalWrite(ledPin2, HIGH);    // turn the LED off (LOW is the voltage level)
     bot.sendMessage(chat_id, "All led is ON", "");
   }
   if (text == "/rules") {
     bot.sendMessage(chat_id, "Perintah yang dapat diproses adalah perintah yang tertera dalam menu /help, Akep_bot juga tidak mentolerir adanya kesalahan pengetikan.","");
   }
   if (text == "Akep") {
     bot.sendMessage(chat_id, "Hai " + from_name + " aku disini, ketikan /start untuk memulai bot");
   }
   if (text == "/status1") {
     if(ledStatus){
       bot.sendMessage(chat_id, "Led is ON", "");
     } else {
       bot.sendMessage(chat_id, "Led is OFF", "");
     }
   }
      if (text == "/status2") {
     if(ledStatus){
       bot.sendMessage(chat_id, "Led is ON", "");
     } else {
       bot.sendMessage(chat_id, "Led is OFF", "");
     }
   }
   if (text == "/start") {
     bot.sendMessage(chat_id,"Selamat datang di Aplikasi Bot Telegram\n hai "+ from_name +", ketikkan /help untuk melihat perintah apa saja yang tersedia pada bot");
   }
   if (text == "/help") {
     String welcome = "Hai " + from_name + " :) \n";
     welcome += "berikut perintah yang tersedia pada bot\n";
     welcome += "/rules     : aturan memakai bot\n";
     welcome += "/led1on   : menyalakan led 1\n";
     welcome += "/led1off  : mematikan led 1\n";
     welcome += "/led2on   : menyalakan led 2\n";
     welcome += "/led2off  : mematikan led 2\n";
     welcome += "/status1  : cek status led 1\n";
     welcome += "/status2  : cek status led 2\n";
     welcome += "/allon     : menyalakan kedua led\n";
     welcome += "/alloff    : mematikan kedua led\n";
     bot.sendMessage(chat_id, welcome, "Markdown");
   }
   }
 }
void setup() {
 Serial.begin(115200);
 // Set WiFi to station mode and disconnect from an AP if it was Previously
 // connected
 WiFi.mode(WIFI_STA);
 WiFi.disconnect();
 delay(100);
 // attempt to connect to Wifi network:
 Serial.print("Connecting Wifi: ");
 Serial.println(ssid);
 Serial.println("ketikan nama bot anda pada telegram");
 WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED) {
   Serial.print(".");
   delay(500);
 }
 Serial.println("");
 Serial.println("WiFi terhubung");
 Serial.print("IP address: ");
 Serial.println(WiFi.localIP());
 Serial.println("ketikan nama bot anda pada telegram ");
 Serial.println("");
 pinMode(pir, INPUT);
 pinMode(ledPin1, OUTPUT); // initialize digital ledPin as an output.
 pinMode(ledPin2, OUTPUT);
 delay(10);
 digitalWrite(ledPin1, LOW); // initialize pin as off
 digitalWrite(ledPin2, LOW);
 myservo.attach(12);
 myservo.write(180);
}
void loop() {
 if (millis() > Bot_lasttime + Bot_mtbs)  {
   int numNewMessages = bot.getUpdates(bot.last_message_received + 1);
   while(numNewMessages) {
     Serial.println("Pesan Diterima");
     Serial.println("sedang diproses.....");
     handleNewMessages(numNewMessages);
     numNewMessages = bot.getUpdates(bot.last_message_received + 1);
   }
   Bot_lasttime = millis();
 }
}
;>

3.配置電報(bào)機(jī)器人

4. 設(shè)置設(shè)備

?

?
pYYBAGOrz3uAbU7pAAFmBbmzSYM911.png
?

5. 測(cè)試

?

?

?

?


下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評(píng)論

查看更多

下載排行

本周

  1. 1DD3118電路圖紙資料
  2. 0.08 MB   |  1次下載  |  免費(fèi)
  3. 2AD庫封裝庫安裝教程
  4. 0.49 MB   |  1次下載  |  免費(fèi)
  5. 3PC6206 300mA低功耗低壓差線性穩(wěn)壓器中文資料
  6. 1.12 MB   |  1次下載  |  免費(fèi)
  7. 4網(wǎng)絡(luò)安全從業(yè)者入門指南
  8. 2.91 MB   |  1次下載  |  免費(fèi)
  9. 5DS-CS3A P00-CN-V3
  10. 618.05 KB  |  1次下載  |  免費(fèi)
  11. 6海川SM5701規(guī)格書
  12. 1.48 MB  |  次下載  |  免費(fèi)
  13. 7H20PR5電磁爐IGBT功率管規(guī)格書
  14. 1.68 MB   |  次下載  |  1 積分
  15. 8IP防護(hù)等級(jí)說明
  16. 0.08 MB   |  次下載  |  免費(fèi)

本月

  1. 1貼片三極管上的印字與真實(shí)名稱的對(duì)照表詳細(xì)說明
  2. 0.50 MB   |  103次下載  |  1 積分
  3. 2涂鴉各WiFi模塊原理圖加PCB封裝
  4. 11.75 MB   |  89次下載  |  1 積分
  5. 3錦銳科技CA51F2 SDK開發(fā)包
  6. 24.06 MB   |  43次下載  |  1 積分
  7. 4錦銳CA51F005 SDK開發(fā)包
  8. 19.47 MB   |  19次下載  |  1 積分
  9. 5PCB的EMC設(shè)計(jì)指南
  10. 2.47 MB   |  16次下載  |  1 積分
  11. 6HC05藍(lán)牙原理圖加PCB
  12. 15.76 MB   |  13次下載  |  1 積分
  13. 7802.11_Wireless_Networks
  14. 4.17 MB   |  12次下載  |  免費(fèi)
  15. 8蘋果iphone 11電路原理圖
  16. 4.98 MB   |  6次下載  |  2 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935127次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233089次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費(fèi)下載
  8. 340992  |  191390次下載  |  10 積分
  9. 5十天學(xué)會(huì)AVR單片機(jī)與C語言視頻教程 下載
  10. 158M  |  183342次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81588次下載  |  10 積分
  13. 7Keil工具M(jìn)DK-Arm免費(fèi)下載
  14. 0.02 MB  |  73815次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65989次下載  |  10 積分