Figure 11 shows a flow chart of the program that parses the data transferred from the base-station node to the computer and records it in database. Figure 12 shows the program operated with sample data. The primary function of this program is to read the latest temperature and humidity values recorded in the database and then compare them with respective threshold values. Subsequently, it simulates the opening and closing of the air-conditioning system, again comparing temperature and humidity values obtained during the operation of the air-conditioning system in the tunnels. In the measurements performed with the TelosB nodes in the tunnels, temperature ranged between 14 0C and 16 0C and humidity ranged between 53% and 55%. Therefore, these values were used as the threshold values in the simulation.