Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions examples/MicroOLED_Demo/MicroOLED_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,21 @@ void textExamples()
s++; // and increment s
}
}

// Demonstrate font 4. 31x48. Let's use the print function
// to display some characters defined in this font.
oled.setFontType(4); // Set font to type 4
oled.clear(PAGE); // Clear the page
oled.setCursor(0, 0); // Set cursor to top-left
// Print can be used to print a string to the screen:
oled.print("OL");
oled.display(); // Refresh the display
delay(1000); // Delay a second and repeat
oled.clear(PAGE);
oled.setCursor(0, 0);
oled.print("ED");
oled.display();
delay(1000);
}

void loop()
Expand Down
2 changes: 2 additions & 0 deletions src/SFE_MicroOLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "util/font8x16.h"
#include "util/fontlargenumber.h"
#include "util/7segment.h"
#include "util/fontlargeletter31x48.h"

// Change the total fonts included
#define TOTALFONTS 4
Expand All @@ -60,6 +61,7 @@ const unsigned char *MicroOLED::fontsPointer[]={
,font8x16
,sevensegment
,fontlargenumber
,fontlargeletter31x48
};

/** \brief MicroOLED screen buffer.
Expand Down
Loading