A frambuffer driver for REPL console use; develop and debug display code without hardware. #15327
easytarget
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
While making unicode examples, and after seeing the use of block's in a similar function from @bdbarnett, I have added a (default) block mode for the screen representation: (it looks better in my terminal console than here in markdown)
'pure' ascii output is still supported if the unicode blocks above give issues.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
looks quite useful for testing indeed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of testing v2 of my micropython font work I was doing a lot of work on my Laptop, and didnt want to carry a breadboard+devices about on the train etc.
So I wrote and evolved this REPL/console 'framebuffer display driver' based on the ubiquitous
ssd1306.py
driver.You import and init() in place of your framebuffer driver, it logs out all calls to the display and shows an ascii-art represention of the frambuffer when
show()
is called and the framebuffer has changed.This also turned out to be really useful for examining and testing alignment and positional stuff without needing to squint at a tiny display.. 👓. I'm sure others have done similar things before me, but it seems a shame not to share this
If you specify a large framebuffer it will obviously wreck havoc with your console output, I mostly used it with a 64x24 buffer, this produces an output that doesn't overflow the console everywhere.
There is an option to clear the console before the framebuffer is shown, and to change the zero character (default is
looks better visually)
.
, good for debug work but a spaceThe source is in my repo at:
https://github.com/easytarget/microPyEZfonts/blob/main/drivers/repl_1306.py
Example
Beta Was this translation helpful? Give feedback.
All reactions