Page 228 - ARM Based Microcontroller Projects Using MBED
P. 228
214 8. INTERMEDIATE LEVEL PROJECTS
FIG. 8.81 Project constructed on a breadboard.
BEGIN
Display heading
DO FOREVER
Read voltage across LDR
Calculate LDR resistance
Calculate the light level
Display the light level in lux
Wait 1 second
ENDDO
END
FIG. 8.82 Program PDL.
8.25 PROJECT 21—CHANGING LED FLASHING RATE
WITH A POTENTIOMETER
8.25.1 Description
In this project, a potentiometer is used to change the flashing rate of the User LED. As the
potentiometer arm is rotated, the LED flashing rate changes from 0 (no flashing) to flashing
every second.