addSensorReading sketch code and test case