You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from machnie import Pin
|
|
import time
|
|
import onewire
|
|
import ds18x20
|
|
|
|
ds18b20 = ds18x20.DS18X20(onewire.OneWire(Pin(13)))
|
|
roms = ds18b20.scan()
|
|
|
|
while True:
|
|
ds18b20.convert_temp()
|
|
time.sleep(1)
|
|
for rom in roms:
|
|
print(ds18b20.read_temp(rom)) |