Step 2: Upgrade Raspberry Pi OS kernel
$ sudo apt-get update
$ sudo apt-get upgrade
Step 3: Modify the configuration files
$ sudo vim /boot/config.txt
Then scroll to the bottom and type:
dtoverlay=w1-gpio
Then reboot Raspberry Pi
$ sudo reboot
Mount the device drivers and confirm whether the device is effective or not
$ sudo modprobe w1-gpio
$ sudo modprobe w1-therm
$ cd /sys/bus/w1/devices/
$ ls