Discuss PIC and electronic related things
Moderators: David Barker, Jerry Messina
-
TimB
- Posts: 262
- Joined: Wed Oct 04, 2006 7:25 am
- Location: London UK
Post
by TimB » Sun Mar 16, 2008 1:02 pm
I have an app that flashs a led, trouble is in day time its to dim and at night to bright.
Now I have seen people use Leds as buttons so obviously there is some feed back in them, but can I use them as a crude ambient light sensor, so I can use it to set the brightness level?
Ta
Tim
-
TimB
- Posts: 262
- Joined: Wed Oct 04, 2006 7:25 am
- Location: London UK
Post
by TimB » Sun Mar 16, 2008 1:06 pm
-
TimB
- Posts: 262
- Joined: Wed Oct 04, 2006 7:25 am
- Location: London UK
Post
by TimB » Sun Mar 16, 2008 5:15 pm
Its really quite simple
I put a v meter across a LED and in the dark got a low voltage and under a table lamp got 0.2v well within the range of the A/D
So when my led is off or every x mins I will to an a/d on it to determine the voltage and adjust my pwm accordingly
Cheers