API for SSD1306 I2C-controlled OLED displays.
More...
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.
lcd->
draw(intel_logo, 1024);
sleep(3);
sleep(3);
sleep(3);
sleep(3);
sleep(3);
sleep(5);
sleep(5);
sleep(5);
sleep(5);
delete lcd;
SSD1306 |
( |
int |
bus, |
|
|
int |
address = 0x3C |
|
) |
| |
SSD1306 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.
mraa::Result invert |
( |
bool |
i | ) |
|
Inverts the display
- Parameters
-
i | true to invert, false for normal display |
- Returns
- Result of the operation
void startscrollright |
( |
uint8_t |
start, |
|
|
uint8_t |
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
-
start | First row to scroll |
stop | Last row to scroll |
- Returns
- void
void startscrollleft |
( |
uint8_t |
start, |
|
|
uint8_t |
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
-
start | First row to scroll |
stop | Last row to scroll |
- Returns
- void
void startscrolldiagright |
( |
uint8_t |
start, |
|
|
uint8_t |
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
-
start | First row to scroll |
stop | Last row to scroll |
- Returns
- void
void startscrolldiagleft |
( |
uint8_t |
start, |
|
|
uint8_t |
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
-
start | First row to scroll |
stop | Last row to scroll |
- Returns
- void
Stops display scrolling.
- Returns
- void
Dims display
- Parameters
-
dim | True to dim display, false for max intensity |
- Returns
- Result of last operation
The documentation for this class was generated from the following files:
- /iotdk/jenkins/workspace/upm-doc-stable/src/lcd/ssd1306.h
- /iotdk/jenkins/workspace/upm-doc-stable/src/lcd/ssd1306.cxx