MakerWorld
Office
Ver Modelo
Vertical button with arduino WEMOS
29
Descargas
12
Likes
10
Makes
Materials needed:Wemos d1 miniServo motor (ebay)Others:Telegram Bot (YouTube)The code:#include #include #include #include // Wifi network station credentials #define WIFI_SSID "WIFINAME" #define WIFI_PASSWORD "WifiPassword" // Telegram BOT Token (Get from Botfather) #define BOT_TOKEN "BotToken" #define BOT_ID "BotID" const unsigned long BOT_MTBS = 1000; Servo servoMotor; X509List cert(TELEGRAM_CERTIFICATE_ROOT); WiFiClientSecure secured_client; UniversalTelegramBot bot(BOT_TOKEN, secured_client); unsigned long bot_lasttime; void handleNewMessages(int numNewMessages) { for (int i = 0; i < numNewMessages; i++) { if(bot.messages[i].text == "/start" && bot.messages[i].chat_id == BOT_ID){ bot.sendMessage(bot.messages[i].chat_id, "Bones!", ""); servoMotor.write(0); } if(bot.messages[i].text == "/on" && bot.messages[i].chat_id == BOT_ID){ servoMotor.write(0); servoMotor.write(180); delay(1000); servoMotor.write(90); bot.sendMessa
¿Has impreso este modelo? Inicia sesión y comparte tu make.
Inicia sesión para dejar un comentario
Iniciar sesiónAún no hay comentarios – ¡sé el primero!