Comments on: MicroPython: MQTT – Publish DS18B20 Temperature Readings (ESP32/ESP8266) https://randomnerdtutorials.com/micropython-mqtt-publish-ds18b10-esp32-esp8266/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Fri, 29 Aug 2025 09:56:20 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Sara Santos https://randomnerdtutorials.com/micropython-mqtt-publish-ds18b10-esp32-esp8266/#comment-1088218 Fri, 29 Aug 2025 09:56:20 +0000 https://randomnerdtutorials.com/?p=95833#comment-1088218 In reply to kallie.

Hi.
Basically, create a new file in Thonny IDE.
Then, save it to the board with the name main.py.

Let me know if you have more questions.

Regards,
Sara

]]>
By: kallie https://randomnerdtutorials.com/micropython-mqtt-publish-ds18b10-esp32-esp8266/#comment-1087770 Thu, 28 Aug 2025 17:56:34 +0000 https://randomnerdtutorials.com/?p=95833#comment-1087770 may I ask how do you copy the code into MAin.py
Code
After uploading the library to the ESP32 or ESP8266, copy the following code to the main.py file. It publishes the temperature readings on the esp/ds18b20/temperature topic every 5 seconds.

]]>
By: Ed https://randomnerdtutorials.com/micropython-mqtt-publish-ds18b10-esp32-esp8266/#comment-480233 Sun, 26 Jul 2020 20:31:45 +0000 https://randomnerdtutorials.com/?p=95833#comment-480233 Great article.
Are you sure your title is correct? I do not think there is a DS18B20

]]>