Go Down

Topic: Determine if an LED is on or off on another device. (Read 657 times) previous topic - next topic

action_owl

Hello,
I want to use my arduino to tell if an LED is on or off on a different electronic device.
I don't want to use a LDR because ambient light will affect the reading, is there a way that I can connect the arduino to the LED leads and use analog read to tell that the LED is on/off without affecting the LED?

Something like ...
Arduino A0 connected to LED +
Arduino GND connected to LED -

then somethign like...
Code: [Select]
if(analogRead(A0) > threshold){
// LED is ON
} else {
  // LED is OFF
}

robtillaart


Sounds like something that should work. If the device drives the LED with 5V (and include a resistor) you better measure over the resistor and the LED.
You could then use a "simpler" digitalRead(PIN) instead resulting in HIGH or LOW.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

action_owl

Thanks robtillaart,
Good call with the digitalRead() that sounds like a better approach than analogRead()

Grumpy_Mike

Don't forget to connect the grounds of the two systems together or it will not work.

Go Up