MQTT - 💬 ESP32 Subscribe Using PubSubClient.h

Опубликовано: 09 Август 2026
на канале: OhioIoT
424
18

Subscribing to MQTT topics on and ESP32 requires some thought. It's better to get that thought done now, and stash your logic in a library, so that you get back to making your cool projects. Let's get the hard stuff out of the way now.

PubSubClient is still the de facto standard for setting up MQTT on ESP32. It hasn't been updated in five years, it has a lot of blocking code, but... it's effective, and I don't know if there is a faster way to get you going on MQTT.

For more on "All Things IoT" — 🔔 Subscribe

🛠️ What You'll Learn In This Video:
How to set your MQTT library to take subscription configuration requirements from the outside

🖥️ Code Examples:
Starting Code: https://github.com/OhioIoT-MQTT-Examp...
Ending Code: https://github.com/OhioIoT-MQTT-Examp...

🔗 Resources:
PubSubClient library: https://github.com/knolleary/pubsubcl...

🎬 Video Links:
"Previous Video":    • MQTT - 💬 ESP32 Publish Using PubSubClient.h  


OhioIoT is an IoT platform designed and built for small-scale IoT projects (https://www.ohioiot.com).