Skip to content
Larry Bank edited this page Nov 15, 2019 · 3 revisions

A few tips for getting started with the ss_oled library

One of the most frequently asked questions is - "Why isn't there a true print function included in the library?" Many display libraries include a print/printf/println function to mimic the features of the Arduino Serial library. The reason I didn't include it in ss_oled is because it goes against one of the goals of the library - small size. By adding a formatted print function, it would necessarily add a dependency on printf() or I would need to write similar code. If you need to print formatted output of numbers, strings, etc, you can do it like this:

char szTemp[32];
sprintf(szTemp, "My value = %d", myValue);
oledWriteString(0,0,0, szTemp, FONT_NORMAL, 0 1);

The printf() functions in the C runtime library are pretty large and I didn't want them to be a forced dependency within ss_oled.

Clone this wiki locally