API for SSD1308 I2C-controlled OLED displays.
More...
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.
lcd.draw(intel_logo, 1024);
|
| SSD1308 (int bus, int address=0x3C) |
|
| ~SSD1308 () |
|
mraa::Result | draw (uint8_t *data, int bytes) |
|
mraa::Result | write (std::string msg) |
|
mraa::Result | setCursor (int row, int column) |
|
mraa::Result | clear () |
|
mraa::Result | home () |
|
mraa::Result | write (int x, int y, std::string msg) |
|
std::string | name () |
|
SSD1308 |
( |
int |
bus, |
|
|
int |
address = 0x3C |
|
) |
| |
SSD1308 constructor; calls libmraa initialisation functions
- Parameters
-
bus | I2C bus to use |
address | Slave address the LCD is registered on |
mraa::Result draw |
( |
uint8_t * |
data, |
|
|
int |
bytes |
|
) |
| |
Draws an image; see examples/python/make_oled_pic.py for an explanation of how pixels are mapped to bytes
- Parameters
-
data | Buffer to read |
bytes | Number of bytes to read from the pointer |
- Returns
- Result of the operation
mraa::Result write |
( |
std::string |
msg | ) |
|
|
virtual |
Writes a string to the LCD
- Parameters
-
msg | std::string to write to the display; note: only ASCII characters are supported |
- Returns
- Result of the operation
Implements LCD.
mraa::Result setCursor |
( |
int |
row, |
|
|
int |
column |
|
) |
| |
|
virtual |
Sets the cursor to specified coordinates
- Parameters
-
row | Row to set the cursor to |
column | Column to set the cursor to |
- Returns
- Result of the operation
Implements LCD.
Clears the display of all characters
- Returns
- Result of the operation
Implements LCD.
Returns to the original coordinates (0,0)
- Returns
- Result of the operation
Implements LCD.
The documentation for this class was generated from the following files: