I've wired simple circuit with 9V battery, red LED, 10K resistor to turn the light on.
And I'd like to know if the LED is lighting or not using arduino.
I simply wired Arduino's A0 pin and LED's + lead. Next, if I get value from A0 using analogRead() function, it returns 0 always. If I just read from A0 without wire, it returns random values(I don't know it's random or not, anyway, it seems to be irregular).
Question: How can I know external circuit's LED is lighting or not using Arduino?
the question is related with this question
I've tested following schematic(sorry for its poor drawing)
4 digits display ----- 4N35(PIN 1) ㄴ---------- 4N35(PIN 2) ARDUINO 5V ----------- 4N35(PIN 5) GND ---------- 4N35(PIN 4) A0 ----------- 4N35(PIN 4) <--- This is the goal
If I place LEDs for each side, it works well.
The problem is, the voltage I've measure from 4 digits display is too low as around 0.14. So, it may be the reason 4N35 doesn't emit any signal I think(If I turned the power on of portable range, Arduino side LED is turned on for a moment).
Okay, Question again please !!! I'd like to know the state of portable range and my trying is figuring out which LED is lighting from the 4 digits display. But, 4N35 could not catch its voltage(not sure tho). How can I do this? Any comment will be helpful.