Fixed a bug in data collection

(Failed to reinitialize "int sum" to zero before using it to measure
humidity)