PubSubClient is still the de facto standard for setting up MQTT on ESP32. There are a few things to think about before you start laying out your code for your IoT device. Let's get you familiar with the key considerations.
PubSubClient 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 overload functions in a library
- How to extend your publishing capability to other parts of your codebase
🖥️ *Code Examples:*
- Ending Code:
https://github.com/OhioIoT-MQTT-Examples/ESP32-Publish.git🔗 *Resources:*
- PubSubClient library:
https://github.com/knolleary/pubsubclient🎬 *Video Links:*
"Previous Video":
https://www.youtube.com/watch?v=He9YtNsHtYUOhioIoT is an IoT platform designed and built for small-scale IoT projects (
https://www.ohioiot.com).