Zoltan Hudak
/
MQTT_Hello
MQTT client to test the ENC28J60-EMAC on NUCLEO-F446RE.
Diff: main.cpp
- Revision:
- 1:1c2544eafc9c
- Parent:
- 0:238f0d0c0ba3
- Child:
- 2:2a16a9f4509c
diff -r 238f0d0c0ba3 -r 1c2544eafc9c main.cpp --- a/main.cpp Fri Mar 26 16:15:14 2021 +0000 +++ b/main.cpp Fri Mar 26 16:35:09 2021 +0000 @@ -1,15 +1,3 @@ -// In this example we create an MQTT client. -// It's publishing messages with topic 'example/hello' and 'Hello World!' payload. -// The MQTT client also subscribes to some topics which are in its interest to receive. -// Ethernet connection is assured by an affordable ENC28J60 Ethernet module. -// -// MQTT broker is like a post office. -// Its task is to distribute messages published by clients to all subscribers (other clients). -// So the 'example/hello' messages published by this client will be sent to the broker. -// Then the broker will send them to all clients which subscribed to such topic (example/hello). -// Also this client will receive all messages with topics it subscribed to (if published such by other clients). -// 'Mosquitto' is a free implementation of MQTT broker for Linux (e.g. Raspberry Pi, Ubuntu etc.) -// #include "mbed.h" #include "EthernetInterface.h"