import time
from ds1820b import TemperatureSensor
from lcd import LCDScreen
from led import LED
def main():
# SETUP
CZUJNIK = TemperatureSensor(21)
LCD = LCDScreen(sda_pin=0, scl_pin=1, i2c_freq=400000)
DIODA = LED(12)
# LOOP
while True:
# DIODA.toggle_led()
temperatures = CZUJNIK.read_temperature()
for temperature in temperatures:
LCD.display_text(f" T: {temperature} C \n")
# DIODA.max(50,CZUJNIK.read_temperature())
# time.sleep(2)
main()