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.

ST7735 Class

Module: st7735

This module defines the interface for the ST7735 display library
st7735.jpg

Methods

ST7735

(
  • csLCD
  • cSD
  • rs
  • rst
)
Number

Instantiates an ST7735 object

Parameters:

  • csLCD Number

    LCD chip select pin

  • cSD Number

    SD card chip select pin

  • rs Number

    Data/command pin

  • rst Number

    Reset pin

Returns:

Number:

name

() String

Returns the name of the component

Returns:

String:

initModule

()

Initializes the module GPIOs

configModule

()

Configures the chip via the SPI

write

(
  • value
)

Sends a command to an SPI bus (rs must be LOW)

Parameters:

  • value Number

    Command number

data

(
  • value
)

Sends data to an SPI bus (rs must be HIGH)

Parameters:

  • value Number

    Command number

executeCMDList

(
  • addr
)

Executes a set of commands and data

Parameters:

  • addr Const uint8_t *

    Pointer to the start of the commands/data section

setAddrWindow

(
  • x0
  • y0
  • x1
  • y1
)

Sets the window size inside the screen where pixels data is written.

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

drawPixel

(
  • x
  • y
  • color
)

Sends a pixel color (RGB) to the 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.

lcdCSOn

() Mraa::Result

LCD chip select is LOW

Returns:

Mraa::Result:

lcdCSOff

() Mraa::Result

LCD chip select is HIGH

Returns:

Mraa::Result:

sdCSOn

() Mraa::Result

CD card chip select is LOW

Returns:

Mraa::Result:

sdCSOff

() Mraa::Result

CD card select is HIGH

Returns:

Mraa::Result:

rsHIGH

() Mraa::Result

Data select is HIGH

Returns:

Mraa::Result:

rsLOW

() Mraa::Result

Data select is LOW

Returns:

Mraa::Result:

Properties

m_map

Number

Screens buffer