LcdDisplay.HD44780.I2C (LcdDisplay v0.0.13) View Source

Knows how to commuticate with HD44780 type display via I2C. You can turn on/off only one backlight LED.

Examples

alias LcdDisplay.HD44780

config = %{
  display_name: "display 1", # the identifier
  i2c_bus: "i2c-1",          # I2C bus name
  i2c_address: 0x27,         # 7-bit address
  rows: 2,                   # the number of display rows
  cols: 16,                  # the number of display columns
  font_size: "5x8"           # "5x10" or "5x8"
}

# Start the LCD driver and get the initial display state.
{:ok, display} = HD44780.I2C.start(config)

# Run a command and the display state will be updated.
{:ok, display} = HD44780.I2C.execute(display, {:print, "Hello world"})

Link to this section Summary

Functions

Executes the specified command and returns a new display state.

Initializes the LCD driver and returns the initial display state.

Stops the LCD driver.

Link to this section Functions

Link to this function

execute(display, command)

View Source

Executes the specified command and returns a new display state.

Initializes the LCD driver and returns the initial display state.

Stops the LCD driver.