Vadim Artamonov / SSD1327

Dependents:   drive drive1 drive213 drive123213

Embed: (wiki syntax)

« Back to documentation index

SSD1327 Class Reference

SSD1327 Class Reference

96x96 pixel SSD1327 SeeedStudio 1.12" OLED display More...

#include <SSD1327.h>

Public Member Functions

void set_gray_level (unsigned char level)
 Set Gray Level.
void set_font (const uint8_t *Font, int width, int height)
 Set text font.
void set_rc (unsigned char row, unsigned char column)
 Set new Row and Column.
void set_text_rc (unsigned char row, unsigned char column)
 Set new text Row and Column Used after set_font.
void putc (unsigned char C)
 Put char into display using current font.
void puts (const char *str)
 Put string into display using current font.
void clear ()
 Clear display.

Detailed Description

96x96 pixel SSD1327 SeeedStudio 1.12" OLED display

based on https://github.com/blitz/mbed-arch-pro

Example:

#include "mbed.h"
#include "SSD1327.h"
#include "defaultfont.h"

//Pin Defines for I2C Bus
#define D_SDA                  D3
#define D_SCL                  D6
I2C i2c(D_SDA, D_SCL);

// Instantiate OLED
static SSD1327 oled { i2c };
 

 int main() {
         oled.set_font(default_font,8,8);
         oled.set_text_rc(0,0);
         oled.puts("Hello world!");
         while (1) {wait(0.1);}
}

Definition at line 34 of file SSD1327.h.


Member Function Documentation

void clear (  )

Clear display.

Definition at line 144 of file SSD1327.cpp.

void putc ( unsigned char  C )

Put char into display using current font.

Parameters:
C- printed char

Definition at line 93 of file SSD1327.cpp.

void puts ( const char *  str )

Put string into display using current font.

Parameters:
str- printed string

Definition at line 125 of file SSD1327.cpp.

void set_font ( const uint8_t *  Font,
int  width,
int  height 
)

Set text font.

Parameters:
Font- font array
width- font width (only 8, 16, 24 or 32)
height- font height

Definition at line 135 of file SSD1327.cpp.

void set_gray_level ( unsigned char  level )

Set Gray Level.

Parameters:
level- new gray level (0..0xF)

Definition at line 69 of file SSD1327.cpp.

void set_rc ( unsigned char  row,
unsigned char  column 
)

Set new Row and Column.

Parameters:
row- new row (0..95)
column- new column (0..95)

Definition at line 83 of file SSD1327.cpp.

void set_text_rc ( unsigned char  row,
unsigned char  column 
)

Set new text Row and Column Used after set_font.

Parameters:
row- new row (0..96/font_height-1)
column- new column (0..96/font_width-1)

Definition at line 75 of file SSD1327.cpp.