upm  1.5.0
Sensor/Actuator repository for libmraa (v1.8.0)
Public Member Functions | List of all members

API for SSD1306 I2C-controlled OLED displays. More...

Detailed Description

SSD1306 is a 128x64 dot-matrix OLED/PLED segment driver with a controller. This device is available from many suppliers for a very low cost. This implementation was tested using a generic SSD1306 device from eBay.

ssd1306.jpeg

Public Member Functions

synchronized void delete ()
 
 SSD1306 (int bus, int address)
 
 SSD1306 (int bus)
 
int draw (byte[] data)
 
int write (String msg)
 
int setCursor (int row, int column)
 
int clear ()
 
int home ()
 
int invert (boolean i)
 
void startscrollright (short start, short stop)
 
void startscrollleft (short start, short stop)
 
void startscrolldiagright (short start, short stop)
 
void startscrolldiagleft (short start, short stop)
 
void stopscroll ()
 
void dim (boolean dim)
 
- Public Member Functions inherited from LCD
synchronized void delete ()
 
int write (int x, int y, String msg)
 
int write (String msg)
 
int setCursor (int row, int column)
 
int clear ()
 
int home ()
 
String name ()
 

Constructor & Destructor Documentation

SSD1306 ( int  bus,
int  address 
)

SSD1306 constructor; calls libmraa initialisation functions

Parameters
busI2C bus to use
addressSlave address the LCD is registered on

Member Function Documentation

int clear ( )

Clears the display of all characters

Returns
Result of the operation
void dim ( boolean  dim)

Dims display

Parameters
dimTrue to dim display, false for max intensity
Returns
Result of last operation
int home ( )

Returns to the original coordinates (0,0)

Returns
Result of the operation
int invert ( boolean  i)

Inverts the display

Parameters
itrue to invert, false for normal display
Returns
Result of the operation
int setCursor ( int  row,
int  column 
)

Sets the cursor to specified coordinates

Parameters
rowRow to set the cursor to
columnColumn to set the cursor to
Returns
Result of the operation
void startscrolldiagleft ( short  start,
short  stop 
)

Activate a scroll to the upper left for rows start through stop The display is 16 rows tall. To scroll the whole display, run: display.startscrolldiaagright(0x00, 0x0F)

Parameters
startFirst row to scroll
stopLast row to scroll
Returns
void
void startscrolldiagright ( short  start,
short  stop 
)

Activate a scroll to the upper right for rows start through stop The display is 16 rows tall. To scroll the whole display, run: display.startscrollleft(0x00, 0x0F)

Parameters
startFirst row to scroll
stopLast row to scroll
Returns
void
void startscrollleft ( short  start,
short  stop 
)

Activate a scroll to the left for rows start through stop The display is 16 rows tall. To scroll the whole display, run: display.startscrollright(0x00, 0x0F)

Parameters
startFirst row to scroll
stopLast row to scroll
Returns
void
void startscrollright ( short  start,
short  stop 
)

Activate a scroll to the right for rows start through stop The display is 16 rows tall. To scroll the whole display, run: display.scrollright(0x00, 0x0F)

Parameters
startFirst row to scroll
stopLast row to scroll
Returns
void
int write ( String  msg)

Writes a string to the LCD

Parameters
msgstd::string to write to the display; note: only ASCII characters are supported
Returns
Result of the operation
Inheritance diagram for SSD1306:
Inheritance graph
[legend]
Collaboration diagram for SSD1306:
Collaboration graph
[legend]

The documentation for this class was generated from the following file: