import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
from machine import Pin,ADC
from math import log
import tm1637
tm = tm1637.TM1637(clk=Pin(17), dio=Pin(16))
BETA = 3950
ntc=ADC(Pin(28))
while 1:
analogValue = ntc.read_u16()
celsius = 1 / (log(1 / (65535. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15
print("suhu:",celsius,"^C")
tm.temperature(int(celsius))
time.sleep(0.4)