Comments on: ESP32 DS18B20 Temperature Sensor with Arduino IDE (Single, Multiple, Web Server) https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 27 May 2025 08:16:04 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1050901 Tue, 27 May 2025 08:16:04 +0000 https://randomnerdtutorials.com/?p=86576#comment-1050901 In reply to Heinz Ruetschi.

Hi.
Thanks for providing a solution.
Let’s hope that the developer updates the library to fix the issues.
Otherwise, we’ll have to create our own forked version of the library.
Regards,
Sara

]]>
By: Heinz Ruetschi https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1050471 Mon, 26 May 2025 19:00:01 +0000 https://randomnerdtutorials.com/?p=86576#comment-1050471 Hi Sara
Thank you, I found the solution to the problem,
The issue is the declaration of some variables in OneWire_direct_gpio.h file of the library OneWire which can be found in the file OneWire_direct_gpio.h at https://github.com/devastar/esp32c6-zigbee-ds18b20-temperature
OneWire has the problematic file in the library directory at C:\Users\HR\Documents\Arduino\libraries\OneWire\util on a windows10 notebook.

I tested the updated OneWire_direct_gpio.h file of https://github.com/devastar/esp32c6-zigbee-ds18b20-temperaturer in the program directory and changed the directory in the OneWire.cpp in the C:\Users\HR\Documents\Arduino\libraries\OneWire directory as follows:
#include “C:/Users/HR/Documents/Arduino/Projects/esp32c6-zigbee-ds18b20-temperature/OneWire_direct_gpio.h”
//#include “util/OneWire_direct_gpio.h”
After that the program had no issue anymore with the ESP32-C6-WROOM-1 and compiled without any problems.
The sensor then worked fine in zigbee2MQTT.

OneWire_direct_gpio.h in OneWire/util needs to be replaced until the next update of the OneWire library is happening.

I hope this helps.
Greetings Heinz

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1050177 Mon, 26 May 2025 11:41:35 +0000 https://randomnerdtutorials.com/?p=86576#comment-1050177 In reply to Heinz Ruetschi.

Hi.
I think there is an issue with the latest version of the ESP32 core and the OneWire library, but I didn’t have the time to test it yet and try to find out whats wrong.
Regards,
Sara

]]>
By: Heinz Ruetschi https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1048220 Sat, 24 May 2025 12:16:44 +0000 https://randomnerdtutorials.com/?p=86576#comment-1048220 Hi Sara & Rui,

OneWire creates compilation error 1 in Arduino IDE when compiling your Code (Single DS18B20) with ESP32-C6 board

Windows 10
ESP32-C6-WROOM-1
Arduino IDE 2.3.6
OneWire 2.3.8
Dallas 4.0.8

compilation error 1
\Users\HR\Documents\Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:174:25: error: no match for ‘operator>>’ (operand types are ‘volatile gpio_in_reg_t’ and ‘uint32_t’ {aka ‘long unsigned int’})
174 | return (GPIO.in >> pin) & 0x1;
| ~~~~~~~ ^~ ~~~
| | |
| | uint32_t {aka long unsigned int}
| volatile gpio_in_reg_t

Any solution or succession?
With which version of libraries did all this work?

]]>
By: tim https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1044879 Fri, 16 May 2025 13:54:18 +0000 https://randomnerdtutorials.com/?p=86576#comment-1044879 Thanks for the quick response and the tips. I’ll take a look into it.

Regards,
tim

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1044839 Fri, 16 May 2025 10:18:55 +0000 https://randomnerdtutorials.com/?p=86576#comment-1044839 In reply to tim.

Hi.
Are you using plarformio or pioarduino?
For the ESP32, we now recommend the pioarduino extension as it supports the latest versions of the core and the libraries.
https://randomnerdtutorials.com/vs-code-pioarduino-ide-esp32/

Are you using the libraries from ESP32Async?

Regards,
Sara

]]>
By: tim https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1044652 Thu, 15 May 2025 19:34:57 +0000 https://randomnerdtutorials.com/?p=86576#comment-1044652 Dear Sara,
Since six months I have been programming ESP32 using the Arduino IDE and especially with the help of your many fantastic example applications. For which my greatest thanks.
Now I am trying to switch to the Visual code IDE, with the associated problems. I wish to switch because Visual code has more features and above all is much more performant.
What I just can’t get out of is the example of the DS18B20 async web server.
In the Arduino IDE, the program compiles without problems. However, when I enter it into Visual code I get the following error when compiling:
.pio/libdeps/esp32dev/RPAsyncTCP/src/RPAsyncTCP.cpp: In member function ‘bool AsyncClient::operator==(const AsyncClient&) const’:
.pio/libdeps/esp32dev/RPAsyncTCP/src/RPAsyncTCP.cpp:368:66: error: ‘ip_addr_t’ {aka ‘struct ip_addr’} has no member named ‘addr’; did you mean ‘u_addr’?
return (_pcb != NULL && other._pcb != NULL && (_pcb->remote_ip.addr == other._pcb->remote_ip.addr) &&
^~~~
u_addr

The correct libs are in loaded I think:
Dependency Graph
|– DallasTemperature @ 4.0.4
|– OneWire @ 2.3.8
|– ESPAsyncWebServer @ 3.7.7
|– AsyncTCP @ 3.4.1
|– WiFi @ 2.0.0
Building in release mode
Do you have any idea where I am going wrong.
Thanks in advance and thanks again for the many great sample programs

Tim

Translated with DeepL.com (free version)

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1033192 Fri, 02 May 2025 09:21:21 +0000 https://randomnerdtutorials.com/?p=86576#comment-1033192 In reply to Christian.

Hi.
Which version of the ESP32 core do you have installed and which ESP32 model are you using?
Regards,
Sara

]]>
By: Christian https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1032886 Thu, 01 May 2025 13:00:24 +0000 https://randomnerdtutorials.com/?p=86576#comment-1032886 Does no longer compile on ESP32

“GPIO is not declared in this scope” A onewire.h related error on current ESP32 Framework.

Why RMT cant add a DATE to its postings ? This could help for older content relating to library issues or Framework issues.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide/#comment-1028095 Thu, 17 Apr 2025 09:10:49 +0000 https://randomnerdtutorials.com/?p=86576#comment-1028095 In reply to Sutikno.

Hi.
Those libraries run on the ESP32, not on the computer.
So, you shouldn’t have any problems.
Regards,
Sara

]]>