- Code: Select all
#include "EspMQTTClient.h"
void onConnectionEstablished();
EspMQTTClient client(
"ssid*****", // Wifi ssid
"********", // Wifi password
"192.168.1.101", // MQTT broker ip
1883, // MQTT broker port
"89delta", // MQTT username
"*********", // MQTT password
"test1", // Client name DO I NEED THIS????????
onConnectionEstablished, // Connection established callback
true, // Enable web updater
true // Enable debug messages
);
void setup()
{
Serial.begin(115200);
}
void onConnectionEstablished()
{
client.subscribe("89delta/out", [] (const String &payload)
{
Serial.println(payload);
});
I know I still have to go through the RA Library to get the ip address and port.....but is there anything else I would need to do to my code after I run this and get the payload from the serial output? I'd just want to get the values for pH,Salinity, tank temp and maybe a few other things.
Thanks