Asked — Edited

I Used To Know, But I Forgot About Photocells

I guess this would be hooked to the Analog port?

I want to make the EZB either be hungry for the light or afraid of the light. Photophil , and Photopobe by my decision. This would give the robot a more human feeling.

I forgot how to do this.


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

United Kingdom
#1  

Feed your 5v VCC from ADC in, connect the out to the signal. AFAIK a photocell or LDR will reduce the voltage depending on light levels, which will reduce the ADC value depending on light levels, read the ADC and use that for your robot to react to.

I plan something similar with my auto blinds to open when light and close when dark outside using an LDR.