Our first example was outlined in “Getting Started withi ESP8266 and MQTT“. This first example uses a sketch called mqtt-LED-synchronous.ino to blink the internal LED. It waits for the wifi initialization, followed by the MQTT initialization to complete before the continuous loop can run.
The second example is called mqtt-LED and appears similar to the first examples, however while the networking and MQTT code are initializing, the loop is running. In addition, if we temporarily lose MQTT connectivity, the sketch will continue MQTT transmission/reception once communications are re-established.
The third example is called mqtt-JSON and adds JSON data exchange to the previous example, allowing for more detailed information to be exchanged between the control panel and the subscribing device.
mqtt-fire is our first example using the FastLED display library. Controls in this example are a combo box, which is used to select from one or more fire enabled lanterns, while the remaining slider controls support brightness, hue, speed, cooling and sparking.
Comments are closed.