Here are couple of quick ways to set up temperature sensing with ESP32 using DS18B20 temperature sensors. Why DS18B20 you may ask. Well here is why:
- Measures Temperatures from -55°C to +125°C (-67°F to +257°F)
- ±0.5°C Accuracy from -10°C to +85°C
- Programmable Resolution from 9 Bits to 12 Bits
- Unique 1-Wire® Interface Requires Only One Port Pin for Communication
So its accurate sensor with nice range. Plus its it doesn’t need analog pins because it uses 1-wire digital interface.
So lets get started…