Go Down

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


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


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)


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


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

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131