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.

SSD1351 Class

Module: ssd1351

This module defines the interface for the SSD1351 display library. It was tested with the Adafruit 1.5" OLED Display, but should work with any SSD1351 display running in SPI mode.
On the Intel Edison don't forget to disable SPI Power Management (PM) for this driver to work, you can find more details on this topic here: http://iotdk.intel.com/docs/master/mraa/edison.html
ssd1351.jpg

Methods

SSD1351

(
  • oc
  • dc
  • rst
)
Number

Instantiates an SSD1351 object

Parameters:

  • oc Number

    LCD chip select pin

  • dc Number

    Data/command pin

  • rst Number

    Reset pin

Returns:

Number:

name

() String

Returns the name of the component

Returns:

String:

writeCommand

(
  • value
)

Sends a command to an SPI bus

Parameters:

  • value Number

    Command

writeData

(
  • value
)

Sends data to an SPI bus

Parameters:

  • value Number

    Data

drawPixel

(
  • x
  • y
  • color
)

Sends a pixel color (RGB) to the display buffer or chip

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15])

refresh

()

Copies the buffer to the chip via the SPI bus

ocLow

()

Set OLED chip select LOW

ocHigh

()

Set OLED chip select HIGH

dcLow

()

Data select LOW

dcHigh

()

Data select HIGH

useMemoryMap

(
  • var
)

Use memory mapped (buffered) writes to the display

Parameters:

  • var Boolean

    true for yes (default), false for no