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!
Asked
Active
Viewed 107 times
1
1 Answers
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,301
- 10
- 19
- 28
dtoverlay=w1-gpio
ordtoverlay=w1-gpio-pullup
in /boot/config.txt? https://pinout.xyz/pinout/1_wire – Dougie Sep 01 '19 at 21:23