Let's Make Robots!

share

Shared microcontroller pin

A quick search here did not give me any relevant hits. So, I was hoping to ask the electronic gurus here if my plan/idea will work.

My thinking is that the photoresistor will be able to be read by the analog input and, because of the diode, the LED will not light unless the microcontroller is set as an output and set LOW.

EDIT:

Based on the input so far, I have redrawn the circuit. I hope the collective doesn't mind helping me get circuits straight.