Figure 2—These are the two main elements of the temperature sensor software. The foreground loop on the left manages the DS1820 and the LCD. The background interrupt- driven task on the right receives and transmits X-10 commands via the TW-523.