I had a similar problem using 1-wire and a Display-o-tron HAT blocking GPIO pin 4 (the default 1-wire pin).
Edit your config.txt (sudo nano /boot/config.txt) and add another line after dtoverlay=w1-gpio with “gpiopin=” and the pin number you wish to use (I can’t remember now if it is the GPIO number or physical number (I am using GPIO 5 and my notes also say that’s pin 29 and I can’t check just now which one it was).