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

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

Detailed Description

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

ssd1327.jpeg
// If you don't set the display to be white, the seeed logo will appear
// jagged
lcd.setGrayLevel((short) 12);
byte[] image = new byte[SeeedLogo.length];
for (int i = 0; i < SeeedLogo.length; i++)
image[i] = (byte) SeeedLogo[i];
lcd.draw(image);
// Simple print hello world
for (short i = 0; i < 12; i++) {
lcd.setCursor(i, 0);
lcd.setGrayLevel(i);
lcd.write("Hello World");
}

Public Member Functions

synchronized void delete ()
 
 SSD1327 (int bus, int address)
 
 SSD1327 (int bus)
 
int draw (byte[] data)
 
void setGrayLevel (short level)
 
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

SSD1327 ( int  bus,
int  address 
)

SSD1327 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
void setGrayLevel ( short  level)

Sets the gray level for the LCD panel

Parameters
levellevel from 0 to 255
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 SSD1327:
Inheritance graph
[legend]
Collaboration diagram for SSD1327:
Collaboration graph
[legend]

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