import machine
import utime

#  this worked fine on 2021FJun09 with MPiADC board
#ADC0 with SW2 ON and CDS0 had no effect.
#blowing (w a straw) on the pico R2040 made temp go up 4 degrees.
sensor_temp = machine.ADC(4)
conversion_factor = 3.3 / (65535)
tim0=utime.time()
print("tim0:",tim0)
while True:
	reading = sensor_temp.read_u16() * conversion_factor
	temperature = 27 - (reading - 0.706)/0.001721
	tim=utime.time()-tim0
	print(tim,temperature)
	utime.sleep(2)
#while end
#printTemp.py
