Configure Raspberry Pi hardware for 1-Wire
masterTo use 1-Wire sensors on a Raspberry Pi, you must modify /boot/config.txt and reboot.
- For a regular connection: add
dtoverlay=w1-gpio. - For a parasitic connection: add
dtoverlay=w1-gpio,pullup="y".
By default, the data pin is GPIO4 (Raspberry Pi connector pin 7). To use a different pin, use dtoverlay=w1-gpio,gpiopin=x where x is your chosen pin.