Enable gpio one-wire interface on Raspberri Pi

Edit your /boot/config.text & append the line below to the end of the file. After, reboot the Raspberry Pi

dtoverlay=w1-gpio

 

Setting a custom pin can be configured as well by specifying the gpiopin

dtoverlay=w1-gpio,gpiopin=17

17 above would be BCM 17 (pin 17) on the gpio header

The device connected to the gpio pin would be listed under /sys/bus/w1/devices

ls -l /sys/bus/w1/devices