pcd_8544 v0.2.0 Pcd8544

Library for PCD8544 based LED displays (Nokia 5110)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Clears the screen.

Sets character cursor position.

Initializes the screen. Receives optional parameters

Writes the string str at given coordinates x, y, and within given length len and then scrolls it if longer than the box given. The text is scrolled character by character with 500ms pause inbetween. Multiple of these boxes can be presented simultaneously and the GenServer takes care about refreshing.

Writes the string str to the current position on the screen. The chars are wrapped at the end of the screen.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Clears the screen.

Link to this function

cursorpos(x, y)

Sets character cursor position.

Link to this function

init(opts \\ [])

Initializes the screen. Receives optional parameters:

  • spi_bus - SPI bus to use (default is 0)
  • spi_dev - SPI device (slave) to use (default is 0)
  • dc_pin - pin on RPi where DC pin of the display is connected to (default is 23)
  • rst_pin - pin on RPi where RST pin of the display is connected to (default is 24)
Link to this function

scroll(str, x, y, len)

Writes the string str at given coordinates x, y, and within given length len and then scrolls it if longer than the box given. The text is scrolled character by character with 500ms pause inbetween. Multiple of these boxes can be presented simultaneously and the GenServer takes care about refreshing.

Link to this function

start_link(opts \\ [])

Writes the string str to the current position on the screen. The chars are wrapped at the end of the screen.