Closed jposada202020 closed 1 year ago
Just sharing what this code give on my SONY Bravia TV. What was your question?
First thank you for your piece of code, I could not have progress without reading your code.
I changed a few things to let you check your screen rendering.
First I make the bitmap exactly the size of the DISPLAY.
a2bitmap = displayio.Bitmap(display.width, display.height, 2)
Then I draw a boarder one pixel inside. Finally I use a sleep loop to stay in the program and not exit in the REPL.
import time
import board
import displayio
from bitmaptools import draw_line
display = board.DISPLAY
group = displayio.Group()
palette = displayio.Palette(1)
palette[0] = 0xFFFFFF
a2 = displayio.Group(x=0, y=0, scale=1)
a2bitmap = displayio.Bitmap(display.width, display.height, 2)
tile2 = displayio.TileGrid(a2bitmap, pixel_shader=palette, x=0, y=0)
draw_line(a2bitmap, 1, 1, 1, display.height-2, 1)
draw_line(a2bitmap, 1, 1, display.width-2, 1, 1)
draw_line(a2bitmap, display.width-2, 1, display.width-2, display.height-2, 1)
draw_line(a2bitmap, 1, display.height-2, display.width-2, display.height-2, 1)
draw_line(a2bitmap, 1, 1, display.height-2, display.height-2, 1)
a2.append(tile2)
group.append(a2)
display.show(group)
while True:
time.sleep(1)
And the result: ![Uploading PXL_20230422_140325386.jpg…]()
I know your mistake, you expect 640x480... and that is the output resolution after pixel doubling, you only have 320x240 in the frame buffer. I know it from listening to "Ask an Engineer" or "Show and Tell", I am not sure where this is documented in writing.
Thank you. Thats explain a lot. Happily will close this 😇. Will test later. Thank you for the info @dglaude . I guess I will need to learn more about this. 🥳
@dglaude Thank you
CircuitPython version
Code/REPL
Behavior
Description
So Not sure if my display resolution is all wrong, but I should get 640x480? If it is my mistake, sorry :). However this script works fine in the Pyportal Titano https://github.com/jposada202020/CircuitPython_uplot/blob/main/examples/uplot_readme_example.py But with the DVI is blown-up and some of the plots could not be seen.
Additional information
No response