In order to make better use of nodemcu to complete more interesting IOT project,we will learn what is MQTT and what is the psbcubclient in this lesson.For those who already familiar with MQTT / Pubsubclient can skip following peragraph,for biginers read for these introduction.
MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport.In a simple language when you want to communicate to your controller through mobile or a web browser you need a communication protocol and MQTT does that magic.MQTT is a message queuing telemetry transport. It is specifically designed for automation.
Some links to articles and tutorials can be found via the legacy Documentation page. — FIXME these should move into the [technical articles](technical articles) and [blog posts](blog posts) pages
It is a library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT.
The latest version of the library can be downloaded from GitHub.
The library comes with a number of example sketches. See
File > Examples > PubSubClient within the Arduino application.
Full API Documentation
The library uses the Arduino Ethernet Client api for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:
YunClientin place of
EthernetClient, and be sure to do a
DownLoad Url osoyoo.com