HT16K33 v0.1.0 HT16K33 View Source

This module provides a library to controll the Adafruit LED Driver via Elixir.

Link to this section Summary

Functions

Clears all LEDs on the display

Inverse the clear-effect: All lights on

Simple function which returns a integer in hex as string with “0x”-prefix to provide clearer output in functions

Initialize the HT16K33 via turning on the oscillator, the display and setting it to ‘no blinking’ and also to full brightness

Sets Blink frequency of the display. Needs a predefined variable as freq. Valid frequencies are: “blink_off”, “blink_2hz”, “blink_1hz and “blink_halfhz”

Sets the brightness of the display. Values between 0 and 15 are possible

Starting the ElixirALE.I2C GenServer to write and read over I2C. Uses default I2C Address and DevName to access the HT16K33

Link to this section Functions

Clears all LEDs on the display.

Inverse the clear-effect: All lights on.

Link to this function integer_to_hex_string(int) View Source

Simple function which returns a integer in hex as string with “0x”-prefix to provide clearer output in functions.

Link to this function run_init(pid) View Source
run_init(pid()) :: :ok

Initialize the HT16K33 via turning on the oscillator, the display and setting it to ‘no blinking’ and also to full brightness.

Link to this function set_blink(pid, freq_key) View Source

Sets Blink frequency of the display. Needs a predefined variable as freq. Valid frequencies are: “blink_off”, “blink_2hz”, “blink_1hz and “blink_halfhz”.

Example: HT16K33.set_blink(pid, "blink_off")

Link to this function set_brightness(pid, brightness) View Source

Sets the brightness of the display. Values between 0 and 15 are possible.

Example: HT16K33.set_brightness(pid, 15)

Link to this function start_link(i2c_devname \\ "i2c-1", i2c_address \\ 112) View Source
start_link(String.t(), byte()) :: {:ok, pid()} | {:error, any()}

Starting the ElixirALE.I2C GenServer to write and read over I2C. Uses default I2C Address and DevName to access the HT16K33.