
Oxon, Daniel Bachfeld
BUILD AN IOT THERMOSTAT
First we’ll build the thermometer with the NTC
thermistor. This temperature-dependent resistor,
together with a 2.2kΩ resistor, creates a voltage
divider we can measure with the Oxocard’s
analog-digital converter (ADC) via pin IN06 on
the breadboard cartridge (Figure
E
). From
this voltage, we can calculate the temperature
using the characteristic values for our NTC. Our
program is essentially:
while true: clear()
adcValue = readADC(IN06, 100)
T = calculateTfromA(adcValue)
drawText(10,90, "T = " + T + "°C")
update()
delay(1000)
In an endless loop, the program clears the
display with clear(), then reads ...