Skip to content

Commit 4e893b5

Browse files
committed
Add font #4 'fontlargeletter31x48'
1 parent e7ddbec commit 4e893b5

File tree

3 files changed

+719
-0
lines changed

3 files changed

+719
-0
lines changed

examples/MicroOLED_Demo/MicroOLED_Demo.ino

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,21 @@ void textExamples()
284284
s++; // and increment s
285285
}
286286
}
287+
288+
// Demonstrate font 4. 31x48. Let's use the print function
289+
// to display some characters defined in this font.
290+
oled.setFontType(4); // Set font to type 4
291+
oled.clear(PAGE); // Clear the page
292+
oled.setCursor(0, 0); // Set cursor to top-left
293+
// Print can be used to print a string to the screen:
294+
oled.print("OL");
295+
oled.display(); // Refresh the display
296+
delay(1000); // Delay a second and repeat
297+
oled.clear(PAGE);
298+
oled.setCursor(0, 0);
299+
oled.print("ED");
300+
oled.display();
301+
delay(1000);
287302
}
288303

289304
void loop()

src/SFE_MicroOLED.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5050
#include "util/font8x16.h"
5151
#include "util/fontlargenumber.h"
5252
#include "util/7segment.h"
53+
#include "util/fontlargeletter31x48.h"
5354

5455
// Change the total fonts included
5556
#define TOTALFONTS 4
@@ -60,6 +61,7 @@ const unsigned char *MicroOLED::fontsPointer[]={
6061
,font8x16
6162
,sevensegment
6263
,fontlargenumber
64+
,fontlargeletter31x48
6365
};
6466

6567
/** \brief MicroOLED screen buffer.

0 commit comments

Comments
 (0)