This example shows how to use a simple LED as light sensor, and to dim a 7-segments LED display with PWM automatically in the dark.
You will use :
Then you surely adjusted the brightness of the LED, so that it is clearly readable in the day light.
But what happens in the dark ? Your display is simply too much bright !
How to know if it is bright or dark, without adding an analog extra-circuit ?
How to control the brightness of the display, without adding an analog extra-circuit ?
You will use :
- the PIC analog input and its ADC
- the PIC timer 0
- a 4 digits 7 segments LED display
- 2 buttons
- a simple LED diode
Then you surely adjusted the brightness of the LED, so that it is clearly readable in the day light.
But what happens in the dark ? Your display is simply too much bright !
How to know if it is bright or dark, without adding an analog extra-circuit ?
How to control the brightness of the display, without adding an analog extra-circuit ?
1. A LED as light sensor ?
