script/examples: Update LCD example.

This commit is contained in:
iabdalkader 2023-10-27 11:00:56 +02:00
parent 7bcdca8241
commit 03dcab088b

View File

@ -14,7 +14,13 @@ import display
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QQVGA2) # Special 128x160 framesize for LCD Shield.
lcd = display.SPIDisplay() # Initialize the lcd screen.
# Initialize the lcd screen.
# Note: A DAC or a PWM backlight controller can be used to control the
# backlight intensity if supported:
# lcd = display.SPIDisplay(backlight=display.DACBacklight(channel=2))
# lcd.backlight(25) # 25% intensity
# Otherwise the default GPIO (on/off) controller is used.
lcd = display.SPIDisplay()
while True:
lcd.write(sensor.snapshot()) # Take a picture and display the image.