display and switches: the physical ones that will be part of
the wall unit, and the virtual ones that will be
implemented as a web page which can be used from
practically anywhere.
The user interfaces — especially the physical one —
went through some trial and error. The original mechanical
thermostat shown in Figure 6 has two switches along the
top that control the fan and operating mode. Originally, I
was going to implement these as slide switches on the
wall interface. That worked fine until I tried to change the
settings from the web interface. The setting would change,
but then when the software looped around to read the
settings of the physical slide switches, the wall thermostat
settings would override the web page settings.
The web settings could not change the position of the
slide switches. I replaced the slide switches with
pushbuttons that will toggle the settings of control
variables in the software. The virtual pushbuttons on the
web page will do the same thing. The thermostat control
loop just looks at the settings of the variables and with
pushbuttons to toggle them, they can be changed from
anywhere.
■ FIGURE 7.
40
September 2011