SSD1306 Class
- ID: ssd1306
- Name: OLED Display
- Other Names: Adafruit SSD1306 OLED Display 0.96"
- Category: display
- Manufacturer: adafruit
- Link: https://www.adafruit.com/datasheets/SSD1306.pdf
- Link: http://www.farnell.com/datasheets/609753.pdf
- Connection: i2c
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.
Item Index
Methods
SSD1306
-
bus
-
address
SSD1306 constructor; calls libmraa initialisation functions
Parameters:
-
bus
NumberI2C bus to use
-
address
NumberSlave address the LCD is registered on
Returns:
draw
-
data
-
bytes
Draws an image; see examples/python/make_oled_pic.py for an explanation of how pixels are mapped to bytes
Parameters:
-
data
Uint8_t *Buffer to read
-
bytes
NumberNumber of bytes to read from the pointer
Returns:
Result of the operation
write
-
msg
Writes a string to the LCD
Parameters:
-
msg
Stringstd::string to write to the display; note: only ASCII characters are supported
Returns:
Result of the operation
setCursor
-
row
-
column
Sets the cursor to specified coordinates
Parameters:
-
row
NumberRow to set the cursor to
-
column
NumberColumn to set the cursor to
Returns:
Result of the operation
clear
()
Mraa::Result
Clears the display of all characters
Returns:
Result of the operation
home
()
Mraa::Result
Returns to the original coordinates (0,0)
Returns:
Result of the operation
invert
-
i
Inverts the display
Parameters:
-
i
Booleantrue to invert, false for normal display
Returns:
Result of the operation
startscrollright
-
start
-
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
NumberFirst row to scroll
-
stop
NumberLast row to scroll
startscrollleft
-
start
-
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
NumberFirst row to scroll
-
stop
NumberLast row to scroll
startscrolldiagright
-
start
-
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
NumberFirst row to scroll
-
stop
NumberLast row to scroll
startscrolldiagleft
-
start
-
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
NumberFirst row to scroll
-
stop
NumberLast row to scroll
stopscroll
()
Stops display scrolling.
dim
-
dim
Dims display
Parameters:
-
dim
BooleanTrue to dim display, false for max intensity