#define KYsensor 5
#define LED 6
void setup()
{
pinMode (KYsensor, INPUT);
pinMode (LED, OUTPUT);
}
void loop()
{
int statusSensor = digitalRead (KYsensor);
if (statusSensor == 1)
{
digitalWrite(LED, HIGH);
}
else
{
digitalWrite(LED, LOW);
}
}