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

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

Detailed Description

SSD1308 is a 128x64 dot-matrix OLED/PLED segment driver with a controller. This implementation was tested using the Grove LED 128*64 Display module, which is an OLED monochrome display.

ssd1308.jpeg
byte[] image = new byte[IntelLogo.length];
for (int i = 0; i < IntelLogo.length; i++)
image[i] = (byte) IntelLogo[i];
lcd.clear();
lcd.draw(image);

Public Member Functions

synchronized void delete ()
 
 SSD1308 (int bus, int address)
 
 SSD1308 (int bus)
 
int draw (byte[] data)
 
int write (String msg)
 
int setCursor (int row, int column)
 
int clear ()
 
int home ()
 
- 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

SSD1308 ( int  bus,
int  address 
)

SSD1308 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
int home ( )

Returns to the original coordinates (0,0)

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
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 SSD1308:
Inheritance graph
[legend]
Collaboration diagram for SSD1308:
Collaboration graph
[legend]

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