#include "EspMQTTClient.h" EspMQTTClient client( "SpeedPanda98", "12345678", "192.168.43.23", // MQTT Broker server ip "omniwheel-controller", // Client name that uniquely identify your device 1883 // The MQTT port, default to 1883. this line can be omitted ); void setup() { Serial.begin(115200); } // This function is called once everything is connected (Wifi and MQTT) // WARNING : YOU MUST IMPLEMENT IT IF YOU USE EspMQTTClient void onConnectionEstablished() { } void loop() { if(Serial.available()) { int delay_duration = Serial.parseInt(); String delay_duration_str = String(delay_duration); while (Serial.available()) { Serial.read(); } client.publish("attiny1614/led", delay_duration_str); } client.loop(); }