1

Recently, I bought a DS18B20 temp sensor to monitor my fermentation temp of my beer and assumed I could just hook up the power, ground and data to their respective pins on the Pi but I could never get it to work. I looked online and there were a lot of tutorials that suggest the modprobe terminal approach but very few (if any) that gave a straightforward GPIO.setup, GPIO.input approach. Is there a reason for this? Is the Dallas 1-wire protocol more complex than I’m assuming? Thanks!

coco
  • 13
  • 2

1 Answers1

1

To enable 1-wire (with or without parasitic power) you need

dtoverlay=w1-gpio

dtoverlay=w1-gpio-pullup

in /boot/config.txt

Dougie
  • 5,381
  • 11
  • 22
  • 30