Just wanted to touch base really quickly - where were you up to with this?(the thought of doing this work twice would be painful)
I’ve got a project where I would also like to use some larger numbers and thought of spinning up a could of small functions to draw specific characters like you requested:
Thanks very much putting that code together. After a bit of thought, I’m more inclined to work with…
I have no idea how font files work, but I can easily generate text files like the following (for example) “5.DAT”
If I have a temperature (say) “+12.34C” I can:
FOR each line
FOR each characters in the string,
call up the appropriate character “.DAT” file and
FOR each line/column in the DAT file, with the appropriate character offset, set the relevant pixels in the frame buffer.
RINSE and REPEAT
[incidentally, How do you indent text in this forum?]
The key element is:
Not too fussed about the speed because it’s a temperature reading which should be varying only slowly (in my case anyway), and we do a screen update only when the entire process is finished. Not particularly elegant either, but it’s simple. Fault finding is relatively straightforward. And updates/correction/alternatives to the font/DAT files can be done with a text editor. Or in my case an Excel spreadsheet using conditional formatting to manually construct DAT file source data for each character.
The hold-up is that I have no idea how to open a file and read the data in micro-python. And zero experience using a Pi . I’m working on it.
In the meantime, if someone wants to put some code together, I’m quite happy to generate the DAT files…
I’m not entirely certain that its possible, the forum’s text input uses markdown so you can bullet items with - or * but screenshots are probably easier (or comment them like code with ``` at the start and end
An interesting discussion.
The bitmap and line drawing methods I used are very limited, but they resulted in a quick solution and low memory usage. When I first started I wanted to develop a font driver, the ability to use existing font files to display characters. I soon found it was beyond my programming skills.
The RPi Pico has a limited memory which is already half used by Micro Python. Adafruits version takes up even more memory space. The RP2040 can support up to 16MB of off chip memory, the Pico has only 2MB. Price, space consideration ??? If version 2 of the Pico is ever produced I would like to see it with the full 16MB.
The PiicoDev OLED module is a great product, I have yet to use it on anything other than the Pico. I am pretty sure a RPi Zero 2 would be able to run scalable fonts. I have done this with an Adafruit OLED and their drivers.
An alternative using the Pico would be to throwaway Micropython and use the Arduino IDE to develop C++ code. I soon gave up this idea because Thonny and Micropython are just too easy to use.