diff --git a/examples/client-with-wifi/client-with-wifi.ino b/examples/client-with-wifi/client-with-wifi.ino index 1f6cce6..8ec50a5 100644 --- a/examples/client-with-wifi/client-with-wifi.ino +++ b/examples/client-with-wifi/client-with-wifi.ino @@ -1,6 +1,8 @@ #include // https://github.com/hsaturn/TinyMqtt /** + * Local broker that accept connections and two local clients + * * * +-----------------------------+ * | ESP | @@ -9,11 +11,12 @@ * | | +--------+ | * | | ^ | * | | | | - * | v v | - * | +----------+ +----------+ | - * | | internal | | internal | | - * | | client | | client | | - * | +----------+ +----------+ | + * | | | | ----- + * | v v | --- + * | +----------+ +----------+ | - + * | | internal | | internal | +-------* Wifi + * | | client | | client | | + * | +----------+ +----------+ | * | | * +-----------------------------+ * diff --git a/examples/client-without-wifi/client-without-wifi.ino b/examples/client-without-wifi/client-without-wifi.ino index 9340706..f75bf33 100644 --- a/examples/client-without-wifi/client-without-wifi.ino +++ b/examples/client-without-wifi/client-without-wifi.ino @@ -1,12 +1,30 @@ #include // https://github.com/hsaturn/TinyMqtt /** TinyMQTT allows a disconnected mode: - * - * In this example, local clients A and B are talking together, no need to be connected. - * A single ESP can use this to be able to comunicate with itself with the power - * of MQTT, and once connected still continue to work with others. - * - */ + * + * +-----------------------------+ + * | ESP | + * | +--------+ | + * | +-------->| broker | | + * | | +--------+ | + * | | ^ | + * | | | | + * | v v | + * | +----------+ +----------+ | + * | | internal | | internal | | + * | | client | | client | | + * | +----------+ +----------+ | + * | | + * +-----------------------------+ + * + * In this example, local clients A and B are talking together, no need to be connected. + * + * A single ESP can use this to be able to comunicate with itself with the power + * of MQTT, and once connected still continue to work with others. + * + * The broker may still be conected if wifi is on. + * + */ std::string topic="sensor/temperature"; diff --git a/examples/simple-broker/simple-broker.ino b/examples/simple-broker/simple-broker.ino index 8636ea8..c026a9b 100644 --- a/examples/simple-broker/simple-broker.ino +++ b/examples/simple-broker/simple-broker.ino @@ -5,6 +5,16 @@ #define PORT 1883 MqttBroker broker(PORT); +/** Basic Mqtt Broker + * + * +-----------------------------+ + * | ESP | + * | +--------+ | + * | | broker | | 1883 <--- External client/s + * | +--------+ | + * | | + * +-----------------------------+ + * void setup() { Serial.begin(115200); diff --git a/examples/simple-client/simple-client.ino b/examples/simple-client/simple-client.ino index 84419e5..7ee7f5b 100644 --- a/examples/simple-client/simple-client.ino +++ b/examples/simple-client/simple-client.ino @@ -1,9 +1,21 @@ #include "TinyMqtt.h" // https://github.com/hsaturn/TinyMqtt -/** Simple Client +/** Simple Client (The simplest configuration) * - * This is the simplest Mqtt client configuration - * + * + * +--------+ + * +------>| broker |<--- < Other client + * | +--------+ + * | + * +-----------------+ + * | ESP | | + * | +----------+ | + * | | internal | | + * | | client | | + * | +----------+ | + * | | + * +-----------------+ + * * 1 - edit my_credentials.h to setup wifi essid/password * 2 - change BROKER values (or keep emqx.io test broker) * diff --git a/examples/tinymqtt-test/tinymqtt-test.ino b/examples/tinymqtt-test/tinymqtt-test.ino index 883b338..3c5fb93 100644 --- a/examples/tinymqtt-test/tinymqtt-test.ino +++ b/examples/tinymqtt-test/tinymqtt-test.ino @@ -5,18 +5,13 @@ #include #include -/** +/** Very complex example * Console allowing to make any kind of test. * - * pros - Reduces internal latency (when publish is received by the same ESP) - * - Reduces wifi traffic - * - No need to have an external broker - * - can still report to a 'main' broker (TODO see documentation that have to be written) - * - accepts external clients - * - * cons - Takes more memory - * - a bit hard to understand + * Upload the sketch, the use the terminal. + * Press H for mini help. * + * TODO examples of scripts */ #include