Micro Python on ESP32 to send telemetry to Azure IoT Hub with MQTT
Published Mar 18 2020 11:29 AM 7,358 Views
Microsoft

We, recently, published a sample of code using MQTT with Micro Python on ESP32. ESP Board can run micro Python, use the esp tool to flash a MicroPython binary on your board, play with interactive Python from the board connected via COM port.

In this sample, we use picocom to monitor and trace execution on the board from the WSL (Windows Subsystem Linux). We also use rshell to allow copying files from your system to the board. Once micro python is installed on your board, it executes at boot time, boot.py and then main.py automatically. Use boot.py to initiate the Wi-Fi connection. In the main.py we use a MQTT client library to send telemetry message to Azure IoT Hub (and receiving message from the cloud)

Enjoy this sample, and open issue or propose PR if you hit problem with this sample or want to enrich it.

Happy coding

Eric

4 Comments
Version history
Last update:
‎Mar 18 2020 11:29 AM
Updated by: