# Started here: https://wokwi.com/micropython
print("ESP32 with DS18B20 with MicroPython")
import machine, onewire, ds18x20, time
ow = onewire.OneWire(machine.Pin(18))
ds = ds18x20.DS18X20(ow)
roms = ds.scan()
while(True):
ds.convert_temp()
time.sleep_ms(750)
print("---------------------")
for rom in roms:
print("Temperature: ", ds.read_temp(rom))