Change subtraction to addition to properly calculate temperature

pull/44/head
ryakosh 2021-12-14 22:22:35 +03:30
rodzic e35954f514
commit 069bbbe7b4
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -9,6 +9,6 @@ while True:
# 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
temperature = 27 + (reading - 0.706)/0.001721
print(temperature)
utime.sleep(2)