const int pinoSensor = 2;
const int Pin_LED = 4;
int Sensor_IR = 0;
void setup() {
pinMode(pinoSensor, INPUT);
pinMode(Pin_LED, OUTPUT);
Serial.begin(9600);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
Sensor_IR = digitalRead(pinoSensor);
Serial.println(Sensor_IR);
if(Sensor_IR == 0){
digitalWrite(Pin_LED, HIGH);
}else{
digitalWrite(Pin_LED, LOW);
}
}