LED status

Is there a way you can read the status of an LED using an arduino code? That is,to read whether an LED is high or low

sort by: active | newest | oldest
iceng3 years ago
By using 3 different resistors attached to three output uP lines
and one analog input uP voltage line,
and one monochrome LDR input line.

YOU can measure the LED voltage at eight different currents
And determine
  • If it is a diode
  • If it is an LED
  • Make reasonable stab at color of LED based of FWD voltage
  • Determine the approximate LED power by LDR intensity drift with current.
How's that for Status ??
MrRedBeard3 years ago
Satirical answer - use solar cells to measure the output
rickharris3 years ago
You should knw if an output is on or not from your code.

If your looking for confirmation that the LED is actually on then you need to set a phototransistor or LDR up so the LED shines on it - Feed that to another input on the microprocessor so you can check it's state.
There must be something missing from your question.

If the LED is lit up it is high.

If the LED is not lit up it is low.

Then there is positive or negative logic.

Arduino in simple terms can look for something but what do you want it to look for?

Light in a sensor, pin diode, photo transistor, or current through a circuit.

But yes you can read the status of an LED with Arduino just what purpose it serves dictates how you do it.
Kiteman3 years ago
Don't you check the voltage across the LED, rather than the status of the LED itself?
Kiteman3 years ago
Don't you check the voltage across the LED, rather than the status of the LED itself?