Hi everyone,
I am building an installation with a light barrier which can detect when people walk through a certain area. I am using a Sharp IS471F to detect light off an infra-red LED but I can't figure out how to make it work. I think this is more a wiring / hardware problem as I just can't get the sensor to read any values. Please find the attached setup.
As from what I understand I connected to 1: 5V, 2: Signal to Arduino, 3: GND, 4: To LED - but somehow it does not give me any input signals. I assume the IR-LED is working as it lights up when I use a regular LED. I use a condensator which has a higher value than suggested in the data sheet, but basically it should work without a condensator as well, right?
Here is the code I am using to test the signal:
int irinput = 6;
int valir = 0;
void setup() {
Serial.begin(9600);
pinMode(irinput, INPUT);
}
void loop(){
valir = digitalRead(irinput);
Serial.print("state = ");
Serial.println(valir);
delay(1000);
}
Data sheet of the IS471F: HTTP 301 This page has been moved
Any ideas what I am doing wrong? Any suggestions would be appreciated very much.