From 03dcab088bb289a02db6e05ae4e0eb9801377b69 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Fri, 27 Oct 2023 11:00:56 +0200 Subject: [PATCH] script/examples: Update LCD example. --- scripts/examples/09-OpenMV-Boards/02-LCD-Shield/lcd.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/examples/09-OpenMV-Boards/02-LCD-Shield/lcd.py b/scripts/examples/09-OpenMV-Boards/02-LCD-Shield/lcd.py index e572c0519..8af26f066 100644 --- a/scripts/examples/09-OpenMV-Boards/02-LCD-Shield/lcd.py +++ b/scripts/examples/09-OpenMV-Boards/02-LCD-Shield/lcd.py @@ -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.