milesburton / Arduino-Temperature-Control-Library

Arduino Temperature Library
https://www.milesburton.com/w/index.php/Dallas_Temperature_Control_Library
958 stars 486 forks source link

Arduino nano esp32 not findiding DS18B20 #246

Closed AngelRionCervi closed 10 months ago

AngelRionCervi commented 10 months ago

Using an arduino nano esp32, I always get -127 as a result with the Simple.ino example. I tried with some resistors, 1K and 4.7K, even then it's on a breadboard so the cables are very short. I also tried with 5V and 3V3, same result.

No issues with a XIAO ESP32C3 or uno R4 WIFI.

RobTillaart commented 10 months ago

(No experience with the NANO ESP32) Which pins of the NANO did you use for data pin? Have you tried others?
Some of the pins might have additional functions already causing problems. (Had a pin problem with another ESP32 when trying some software SPI, so this could be similar).

AngelRionCervi commented 10 months ago

Ok it seems I wrote this issue a bit too fast.

I used the the variable names (A0 for example) instead of the GPIO number (1 in this case). If I use the GPIO numbers from the pinout diagram, it all works fine:

Screenshot 2023-08-29 at 20 55 05

Thank you !