Made small fix to the sensor reading code that solved bug of taking readings every PERIOD+1 (like 101 milliseconds)