SunFounder 3in1 Kit
void loop() {
if (IrReceiver.decode()) {
String decodedValue = decodeKeyValue(IrReceiver.decodedIRData.
˓→command);
if (decodedValue != "ERROR" && decodedValue != lastDecodedValue) {
Serial.println(decodedValue);
lastDecodedValue = decodedValue; // Update the last decoded␣
˓→value
}
IrReceiver.resume(); // Enable receiving of the next value
}
}
• Checks if an IR signal is received and successfully decoded.
• Decodes the IR command and stores it in decodedValue using a custom decodeKeyValue()
function.
• Checks if the decoded value is not an error and is different from the last decoded value.
• Prints the decoded IR value to the serial monitor.
• Updates the lastDecodedValue with the new decoded value.
• Resumes IR signal reception for the next signal.
5.11.3 Temperature - Humidity
Humidity and temperature are closely related from the physical quantity itself to the actual people’s life. The tempera-
ture and humidity of human environment will directly affect the thermoregulatory function and heat transfer effect of
human body. It will further affect the thinking activity and mental state, thus affecting the efficiency of our study and
work.
Temperature is one of the seven basic physical quantities in the International System of Units, which is used to measure
the degree of hot and cold of an object. Celsius is one of the more widely used temperature scales in the world, expressed
by the symbol “℃”.
Humidity is the concentration of water vapor present in the air. The relative humidity of air is commonly used in life
and is expressed in %RH. Relative humidity is closely related to temperature. For a certain volume of sealed gas, the
higher the temperature, the lower the relative humidity, and the lower the temperature, the higher the relative humidity.
4.5. 5. More Syntax 175