You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# SPDX-FileCopyrightText: 2024 Scott Shawcroft for Adafruit Industries# Error chercking by Anne Barela## Docs: https://docs.circuitpython.org/en/latest/shared-bindings/picodvi/# index.html#picodvi.Framebuffer## States: color_depth can be 1, 2, 4, 8, 16# width can be 320, 400, 640, and 800 pixels# height can be 240 ior 480 pixels depending on color_depth## Code at https://github.com/adafruit/circuitpython/blob/main/ports/# raspberrypi/common-hal/picodvi/Framebuffer_RP2350.c## SPDX-License-Identifier: MITimportsysimportboardimportpicodviimportframebufferioimportdisplayioimportneopixeldisplayio.release_displays()
leds=neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.4)
leds.fill((0, 255, 0)) # Initial status: greentry:
fb=picodvi.Framebuffer(400, 240, clk_dp=board.CKP, clk_dn=board.CKN,
red_dp=board.D0P, red_dn=board.D0N,
green_dp=board.D1P, green_dn=board.D1N,
blue_dp=board.D2P, blue_dn=board.D2N,
color_depth=8)
exceptValueErrorase:
print("Error: ", e)
# Per picodvi/Framebuffer_RP2350.c only 320x240 at 8 & 16 bits work# Show errorleds.fill((255, 0, 0)) # Error status: redsys.exit(e)
display=framebufferio.FramebufferDisplay(fb)
# Initialize the display in the display variableruler=displayio.OnDiskBitmap("/display-ruler-rgb-720p.bmp")
t=displayio.TileGrid(ruler, pixel_shader=ruler.pixel_shader)
g=displayio.Group()
g.append(t)
display.root_group=gdisplay.refresh()
whileTrue:
pass
Behavior
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍code.py | 9.2.0-beta.1\Error: Invalid width and height
]0;�Done | 9.2.0-beta.1
Code done running.
NeoPixel red
Mismatch between capability in documentation (and as relayed by Scott) and the current code. I'm unsure how easy it would be to add the additional resolutions.
The text was updated successfully, but these errors were encountered:
@tannewt is 800x480 implemented for RP2350 per above? I looked at the PR and the code header comments appeared that for RP2350 (vs RP2040) "On RP2350, output resolution is always 640x480"
CircuitPython version
Code/REPL
Behavior
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍code.py | 9.2.0-beta.1\Error: Invalid width and height
]0;�Done | 9.2.0-beta.1
Code done running.
NeoPixel red
Description
When the screen with and height are set to 320 x 200 at 8 or 16 bit color_depth, it works. Any other values give an error. Consistent with https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/picodvi/Framebuffer_RP2350.c but inconsistent with what Scott said and https://docs.circuitpython.org/en/latest/shared-bindings/picodvi/index.html#picodvi.Framebuffer
Additional information
Mismatch between capability in documentation (and as relayed by Scott) and the current code. I'm unsure how easy it would be to add the additional resolutions.
The text was updated successfully, but these errors were encountered: