mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
script/examples: Update LCD example.
This commit is contained in:
parent
7bcdca8241
commit
03dcab088b
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user