Go Down

Topic: Determine if an LED is on or off on another device. (Read 730 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
 


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!

Arduino
via Egeo 16
Torino, 10131
Italy