I'm having trouble lighting up an LED with a laser receiver. I've attached Pin 1 to GND, Pin 2 to 5V, and Pin 3 to my Arduino board pin 9. The LED is setup properly and whenever pin 9 receives a high, it sends a high output to the LED from my Arduinos pin 10.
The problem is, pin 9 never receives a high when I point a laser at the laser receiver.
Any ideas?
Here's the laser receiver tube: link
Here's my code:
void setup() {
Serial.begin(9600);
pinMode(10, OUTPUT);
pinMode(9, INPUT);
}
void loop() {
if (digitalRead(9) == HIGH) {
digitalWrite(10, HIGH);
} else {
digitalWrite(10, LOW);
}
}