The microcontroller was programmed in C compiler 4.12
(Custom Computer Services, Waukesha, WI) with the appro-
priate algorithm (Fig. 3) for monitoring the soil-moisture probe
through an analog-to-digital port and the soil-temperature
probe through another digital port, implemented in 1-Wire
communication protocol. A battery voltage monitor is included
through a high-impedance voltage divider coupled to an
analog-to-digital port. The data are packed with the cor-
responding identifier, date, and time to be transmitted via
XBee radio modem using a RS-232 protocol through two
digital ports configured as transmitter (TX) and receiver (RX),
respectively.