Merge pull request #4 from atrueresistance/patch-1

Added comments to the code example. LGTM.
pull/15/head
Alasdair Allan 2021-02-04 11:14:58 +00:00 zatwierdzone przez GitHub
commit b89b320681
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -7,6 +7,8 @@ conversion_factor = 3.3 / (65535)
while True:
reading = sensor_temp.read_u16() * conversion_factor
# The temperature sensor measures the Vbe voltage of a biased bipolar diode, connected to the fifth ADC channel
# Typically, Vbe = 0.706V at 27 degrees C, with a slope of -1.721mV (0.001721) per degree.
temperature = 27 - (reading - 0.706)/0.001721
print(temperature)
utime.sleep(2)