|
upm
1.6.0
Sensor/Actuator repository for libmraa (v1.9.0)
|
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.
Public Member Functions | |
| SSD1306 (int bus, int address=0x3C) | |
| ~SSD1306 () | |
| 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 | invert (bool i) |
| void | startscrollright (uint8_t start, uint8_t stop) |
| void | startscrollleft (uint8_t start, uint8_t stop) |
| void | startscrolldiagright (uint8_t start, uint8_t stop) |
| void | startscrolldiagleft (uint8_t start, uint8_t stop) |
| void | stopscroll (void) |
| void | dim (bool dim) |
Public Member Functions inherited from LCD | |
| mraa::Result | write (int x, int y, std::string msg) |
| std::string | name () |
Additional Inherited Members | |
Protected Attributes inherited from LCD | |
| std::string | m_name |
| SSD1306 | ( | int | bus, |
| int | address = 0x3C |
||
| ) |
| 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
| data | Buffer to read |
| bytes | Number of bytes to read from the pointer |
|
virtual |
|
virtual |
Sets the cursor to specified coordinates
| row | Row to set the cursor to |
| column | Column to set the cursor to |
Implements LCD.

|
virtual |
Clears the display of all characters
Implements LCD.


|
virtual |
Returns to the original coordinates (0,0)
Implements LCD.


| mraa::Result invert | ( | bool | i | ) |
Inverts the display
| i | true to invert, false for normal display |
| 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)
| start | First row to scroll |
| stop | Last row to scroll |
| 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)
| start | First row to scroll |
| stop | Last row to scroll |
| 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)
| start | First row to scroll |
| stop | Last row to scroll |
| 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)
| start | First row to scroll |
| stop | Last row to scroll |
| void stopscroll | ( | void | ) |
Stops display scrolling.
| void dim | ( | bool | dim | ) |
Dims display
| dim | True to dim display, false for max intensity |


1.8.11