Display Text with Adafruit 0.96" OLED and FRDM KL03

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display Text with Adafruit 0.96" OLED and FRDM KL03

1,058 Views
joseemallah
Contributor I

Hello,

I am using the OLED display with the KL03 (SPI communication) and was able to draw a rectangle.

I am wondering how to display text - would appreciate any clue on this.

Thank you

0 Kudos
Reply
1 Reply

1,033 Views
ErichStyger
Specialist I

It would be helpful to know your exact display type.

As for drawing text (or anything else), there are many options.

For example you could use lvgl: https://lvgl.io/ Just keep in mind that the KL03 has limited RAM. But this is something I use for example for an 0.96" OLED over I2C here: https://mcuoneclipse.com/2023/02/11/using-mqtt-with-the-raspberry-pi-pico-w-and-homeassistant-for-an...

 

Another options is to use the a simpler library like the McuLib one (https://github.com/ErichStyger/McuOnEclipseLibrary ) which offers drawing and text functions. Look at https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib/fonts for different font options. Font drawing is done with https://github.com/ErichStyger/McuOnEclipseLibrary/blob/master/lib/src/McuFontDisplay.c and graphics (lines, boxes, triangles, circles, ...) is done with https://github.com/ErichStyger/McuOnEclipseLibrary/blob/master/lib/src/McuGDisplaySSD1306.c .

Finally, the last option is to directly embed a simple font, look at PrintString() in https://github.com/ErichStyger/McuOnEclipseLibrary/blob/master/lib/src/McuSSD1306.c

 

I hope this helps,

Erich