import machine
from machine import *
import utime

sensor_temp = machine.ADC(0)
conversion_factor = 3.3 / (65535)
tim0=utime.time()
print("tim0:",tim0)
temp=ADC(ADC.CORE_TEMP)
conversion=3.3/65535
while True:
	reading = sensor_temp.read_u16() * conversion_factor
	temperature = 27 - (reading - 0.706)/0.001721
	tim=utime.time()-tim0
	print(tim,temperature)
	tempR=temp.read_u16()*conversion
	tempNow=tempR
	print("tempNow:",tempNow)
	utime.sleep(2)
#while end
#printTimTemp.py
