From b228d35ab0ab0bc417701f8925535b5cf47ce861 Mon Sep 17 00:00:00 2001 From: hsaturn Date: Thu, 13 May 2021 03:19:34 +0200 Subject: [PATCH] Attempt to write more readable examples --- examples/simple-broker/simple-broker.ino | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/simple-broker/simple-broker.ino b/examples/simple-broker/simple-broker.ino index ecae3ad..80b0721 100644 --- a/examples/simple-broker/simple-broker.ino +++ b/examples/simple-broker/simple-broker.ino @@ -1,7 +1,5 @@ #include "TinyMqtt.h" // https://github.com/hsaturn/TinyMqtt -#include - #define PORT 1883 MqttBroker broker(PORT); @@ -14,11 +12,22 @@ MqttBroker broker(PORT); * | +--------+ | * | | * +-----------------------------+ + * + * Your ESP will become a MqttBroker. + * You can test it with any client such as mqtt-spy for example + * */ + +const char* ssid = ""; +const char* password = ""; + void setup() { Serial.begin(115200); + if (strlen(ssid)==0) + Serial << "****** PLEASE MODIFY ssid/password *************" << endl; + WiFi.mode(WIFI_STA); WiFi.begin(ssid, password);