i connected a one wire ds18b20 temperature sensor to my pi 3b+.this is the code
import time
from w1thermsensor import W1ThermSensor
sensor = W1ThermSensor()
while True:
temperature = sensor.get_temperature()
print(temperature)
time.sleep(1)
and this is the error i get
Raise NoSensorFoundError("Could not find any sensor")
w1thermsensor.errors.NoSensorFoundError:
Could not find any sensor
Please check cabling and check your /boot/config.txt for
dtoverlay=w1-gpio
i connected the gnd wire to pin 9 power supply to pin 1 (3.3v) and data wire to pin7 i connected a 330 ohms resistor between supply and data wire but i dont get any response . i tried to reverse the power and supply connection to see if the temp sensor heats up and it does,idk what else to do