Serial.print("cm");
Serial.println();
delay(250);
if (cm>=2 && cm<=10)
digitalWrite(10, HIGH);
delay(1000);
digitalWrite(10, LOW);
delay(1000);
}
//****************************************************************
Upload test code to development board and block ultrasonic
sensor by hand, then check if LED is on
Project 6: IR Reception
(1) Description
There is no doubt that infrared remote control is ubiquitous in daily
life. It is used to control various household appliances, such as TVs,
stereos, video recorders and satellite signal receivers. Infrared
remote control is composed of infrared transmitting and infrared
receiving systems, that is, an infrared remote control and infrared
receiving module and a single-chip microcomputer capable of
decoding.