Libary choice for printing text to Oled

Hi all
Please can you recommend a simple libary (low memory use) to output text and values to an Oled display, as U8G2lib is a bit of overkill for my current needs. The display is SSD 1306 and 0.96" the common type 128x64 pixels.

Thanks
Andy

https://retrolcd.com/Components/i2cOLED

I’m currently wrapping up just that.

The link above is a stripped down version of the U8G library that just puts pixels on the screen and blits sprites.

I have the Codepage 437 character set attached which is 8x16 pixels for each character. All 256 characters.

I’ll also be getting the 1602 character set put together which is a smaller font size but has fewer interesting characters.

A “print” function isn’t particularly difficult to write once you can put characters on the screen.

I’ll have the full tutorial up this weekend.

Codepage437.h (73 KB)

I look forward to seeing it!

Thanks

https://retrolcd.com/Curriculum/BitmapFonts

I’ve posted the complete lesson. You can just download the code or read through the PDF to see how it all works.

Basically, I’m using PHP to read in image files and convert them to header files containing the binary data needed to render the sprites from the image on the Arduino. You could use any number of languages to do the conversion.

“Bitmap Fonts” is just a fancy term for sprites intended to be used to display printed information to the user. You can use the techniques described on that page to convert sprite images from old video games into sprites you can render on the Arduino.

I include basic functions to print strings using both the fonts provided. You basically base in a pointer to a string and continue through it until you hit a “zero” or null character.

void BlitText816(int x, int y, byte * font, byte * str)
{
  while (str[0] && x < 128) {
    Blit816(x, y, font + 16 * str[0]);
    str++;
    x += 8;
  }
}

Here is a low memory usage OLED text-only library for 128x64 devices:

GitHub - greiman/SSD1306Ascii: Text only Arduino Library for SSD1306 OLED displays

The screen is not buffered, so it does not need to have a large bit of RAM set aside for it.