Sourcecode pakan lele otomatis
#include <ESP8266WiFi.h> #include <PubSubClient.h> #include <NTPClient.h> #include <WiFiUdp.h> #include <Servo.h> Servo myservo; #define pinServo D1 // Update these with values suitable for your network. const char* ssid = “Mysterious”; const char* password = “tyto180517”; const char* mqtt_server = “broker.mqtt-dashboard.com”; WiFiClient espClient; PubSubClient client(espClient); WiFiUDP ntpUDP; const long utcOffsetInSeconds = 25200; //7*60*60 = GMT + 7 NTPClient timeClient(ntpUDP, “pool.ntp.org”, utcOffsetInSeconds); // By default ‘pool.ntp.org’ is used with 60 seconds update interval and // no offset //NTPClient timeClient(ntpUDP); // You can specify the time server pool and the offset, (in seconds) // additionaly you can specify the update interval (in milliseconds). //NTPClient timeClient(ntpUDP, “id.pool.ntp.org”, 3600, 60000); long lastMsg = 0; char msg[50]; int value = 0; char outTopic[] = “TytoMulyonoOUT”; char inTopic[] = “TytoMulyonoIN”; String d...