DS18B20 temperature sensor was showing bad readings. They are above 900, i don't know how convert them to celsius

The DS18B20 is a digital temperature sensor.
The code that you are using is for an analogue temperature sensor, that is the reason that it gives unexpected results.

There is a tutorial about using the DS18B20 at:
https://lastminuteengineers.com/ds18b20-arduino-tutorial/

1 Like