| Algorithm 1. Pseudo code of the Firmware at the sensor node operated in the measurement mode |
| 1: Call the required libraries (waspXBee and waspSensorPro), |
| 2: Initialize and power on each sensor, |
| 3: Read serial numbers (stored in the EEPROM of each sensor) of sensors used in the node, |
| 4: Wait 90 s for sensors to warm up, |
| 5: Acquire 5 readings from each sensor and compute their average, |
| 6: Apply the calibration/correction formulas (one for each sensor identified by its serial number) for the sensor reading, |
| 7: Save the timestamped-measured data in SD card, |
| 8: Send the data via XBee interface to the gateway, |
| 9: Switch the sensors and radio module to sleep mode for 13 min, |
| 10: Wake up the sensors and radio module, |
| 11: Go to line 4 |