# ESP32-microPython-HiveMQ

**URL:** <https://community.hivemq.com/t/esp32-micropython-hivemq/1609>\
**Category:** HiveMQ Client Library\
**Created:** [November 17, 2022, 12:09pm UTC](https://community.hivemq.com/t/esp32-micropython-hivemq/1609 "2022-11-17T12:09:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juanma](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/juanma/32/469_2.png) [@Juanma](https://community.hivemq.com/u/Juanma)\
**Post date:** [November 17, 2022, 12:09pm UTC](https://community.hivemq.com/t/esp32-micropython-hivemq/1609/1 "2022-11-17T12:09:24Z")

</div>

Hello everyone. I am doing the TFG (University) and I need to connect my ESP32 board to the HiveMQ broker using microPython as IDE. I need to know if there is a microPython library similar to PubSubClient.h (Arduino). I would also like to have an example of how the MQTT client would be implemented in that environment. Thanks.

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [November 17, 2022, 1:20pm UTC](https://community.hivemq.com/t/esp32-micropython-hivemq/1609/2 "2022-11-17T13:20:44Z")

</div>

Hi @Juanma ,

Great to see your and your universities interest in MQTT, welcome to our community 👋

We have a blog article on a similar topic, though it is not about ESP32, but about RPi Pico W:

> **[Getting Started with Raspberry Pi Pico W for IoT: MicroPython and MQTT](https://www.hivemq.com/blog/iot-reading-sensor-data-raspberry-pi-pico-w-micropython-mqtt-node-red/)**
>
> Learn how to build a simple IoT project and read sensor data using Raspberry Pi Pico W, MicroPython, MQTT, HiveMQ Cloud, and Node-Red.

There is also a blog article on ESP32, though it is not in MicroPython, but in C:

> **[IoT Tutorial on how to establish bidirectional MQTT communication on ESP32](https://www.hivemq.com/blog/iot-tutorial-bidirectional-mqtt-communication-esp32/)**
>
> Learn how to use the MQTT protocol for bidirectional communication with the ESP32 to publish messages and subscribe to topics.

Let me know if you find any of these articles helpful  
Best,  
Dasha from HiveMQ team

---

<div class="post-metadata">

**Author:** ![faisal\_saddique](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@faisal\_saddique](https://community.hivemq.com/u/faisal_saddique)\
**Post date:** [November 20, 2022, 8:16pm UTC](https://community.hivemq.com/t/esp32-micropython-hivemq/1609/3 "2022-11-20T20:16:52Z")

</div>

A bundle of thanks, Dasha! This is exactly what I had been looking for for so many days!
