A flowchart of the recording program code of the master microcontroller, which is stored in the PIC18F46K20, is shown in Fig. 6. The program is divided into three procedures; the initialization, the waiting and the recording procedure. In the initialization procedure the program initializes the internal and the external hardware of the PIC18F46K20, including the input/output pins, the LCD, the RTC and the UART unit. Also, in this procedure, the program fetches the predefined user values of the starting up time, the ending time, the number of required sensors and the sampling time from an internal memory called the EEPROM, which it is a non-volatile data memory that usually used to hold the important data inside the microcontroller [24].