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
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
clear()
Clears the screen.
cursorpos(x, y)
Sets character cursor position.
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)
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.
start_link(opts \\ [])
write(str)
Writes the string str
to the current position on the screen. The chars are wrapped at the end of the
screen.