UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

SSD1308 Class

Module: lcd

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.
ssd1308.jpeg

Item Index

Methods

SSD1308

(
  • bus
  • address
)
Number

SSD1308 constructor; calls libmraa initialisation functions

Parameters:

  • bus Number

    I2C bus to use

  • address Number

    Slave address the LCD is registered on

Returns:

Number:

draw

(
  • data
  • bytes
)
Mraa::Result

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 Number

    Number of bytes to read from the pointer

Returns:

Mraa::Result:

Result of the operation

write

(
  • msg
)
Mraa::Result

Writes a string to the LCD

Parameters:

  • msg String

    std::string to write to the display; note: only ASCII characters are supported

Returns:

Mraa::Result:

Result of the operation

setCursor

(
  • row
  • column
)
Mraa::Result

Sets the cursor to specified coordinates

Parameters:

  • row Number

    Row to set the cursor to

  • column Number

    Column to set the cursor to

Returns:

Mraa::Result:

Result of the operation

clear

() Mraa::Result

Clears the display of all characters

Returns:

Mraa::Result:

Result of the operation

home

() Mraa::Result

Returns to the original coordinates (0,0)

Returns:

Mraa::Result:

Result of the operation