To use AsyncMqttClient, you need:
- An ESP8266
- The Arduino IDE for ESP8266 (version 2.2.0 minimum)
- Basic knowledge of the Arduino environment (upload a sketch, import libraries, ...)
There are two ways to install AsyncMqttClient.
- Download the corresponding release
- Load the
.zip
with Sketch → Include Library → Add .ZIP Library
AsyncMqttClient has 1 dependency: ESPAsyncTCP. Download the .zip and install it with the same method as above.
See examples/FullyFeatured-ESP8266.ino
Very important: As a rule of thumb, never use blocking functions in the callbacks (don't use delay()
or yield()
). Otherwise, you may very probably experience unexpected behaviors.
You can go to the API reference.