Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.29 KB

1.-Getting-started.md

File metadata and controls

28 lines (17 loc) · 1.29 KB

Getting started

To use AsyncMqttClient, you need:

  • An ESP8266 or ESP32
  • The Arduino IDE or equivalent IDE for ESP8266/32
  • Basic knowledge of the Arduino environment (use the IDE, upload a sketch, import libraries, ...)

Installing AsyncMqttClient

There are two ways to install AsyncMqttClient.

1a. For the Arduino IDE

  1. Download the corresponding release
  2. Load the .zip with Sketch → Include Library → Add .ZIP Library

AsyncMqttClient has 1 dependency:

  • For ESP8266: ESPAsyncTCP. Download the .zip and install it with the same method as above.
  • For ESP32: AsyncTCP. Download the .zip and install it with the same method as above.

Fully-featured sketch

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.