Lab 08: Test the Backlight

The wire that switches the light inside the screen has not been tested yet. This lab blinks that light five times. The picture shows the bright half of a blink. In the dark half, the whole screen goes black.
Welcome to Lab 08
This quick lab is the last test before your kit becomes a clock. You
will also find out where the light in a screen really comes from.
Let's make time tick!
What You Will Learn
- what a backlight is, and why this screen needs one
- how the Pico switches it on and off
- how a blink can prove that a wire is in the right place
Run It
- Open
08-backlight-test.pyin Thonny and click Run. - The screen turns white, with
Backlight TestandBLK on GP7in black letters. - Watch the screen and the shell together. The screen goes dark each
time the shell prints
backlight OFF.
1 2 3 4 5 6 7 8 9 10 11 12 | |
A Light Behind Tiny Shutters
Your screen is an LCD, short for liquid crystal display. An LCD makes no light of its own. Its picture is a layer of tiny shutters, and behind them sits a white light called the backlight.
Think of a stained-glass window at night. The picture is still in the glass, but you cannot see it with no light behind it. Switching off the backlight does the same to your screen.
1 2 3 4 5 6 7 | |
for i in range(5):repeats the six lines under it five times.config.set_backlight(False)puts a 0 on the Pico's pin GP7, and the light goes out.Trueputs a 1 there, and the light comes back.time.sleep(1)gives you one second to look.
What the Blink Proves
A wire runs from the display's BLK pin to GP7 on the Pico, as How It Is Wired shows. If the screen goes dark in step with the shell, that wire is in the right place.
Try This
- Change
range(5)torange(10)for ten blinks. - Change both
time.sleep(1)lines totime.sleep(0.2). How fast does it blink now? - Change
display.fill(config.WHITE)todisplay.fill(config.BLACK). In a dim room, is black just as dark with the backlight on as with it off?
If It Doesn't Work
- The screen stays lit the whole time. BLK is not on GP7. Many display boards light up by themselves when nothing drives BLK. So a wrong pin looks like "always on." Move the wire to GP7.
Backlight Tested!
You know what a backlight is, and you proved that pin GP7 switches
yours. Next, your kit becomes a real clock!
Next: Lab 09: A Digital Clock