Ardui
Ardui
h"
EspMQTTClient client(
"TehniciAvansate",
"12345678",
"192.168.0.254", // MQTT Broker server ip
"", // Can be omitted if not needed
"", // Can be omitted if not needed
"esp32", // Client name that uniquely identify your device
1883 // The MQTT port, default to 1883. this line can be omitted
);
void setup()
{
Serial.begin(115200);
pinMode(25, OUTPUT);
// Optionnal functionnalities of EspMQTTClient :
client.enableDebuggingMessages(); // Enable debugging messages sent to serial
output
client.enableHTTPWebUpdater(); // Enable the web updater. User and password
default to values of MQTTUsername and MQTTPassword. These can be overrited with
enableHTTPWebUpdater("user", "password").
client.enableLastWillMessage("TestClient/lastwill", "I am going offline"); //
You can activate the retain flag by setting the third parameter to true
}
void loop()
{
client.loop();
}