View Source Fledex.Leds (fledex v0.2.0)

Summary

Types

@type t() :: %Fledex.Leds{count: integer(), leds: map(), meta: map(), opts: map()}

Functions

Link to this function

convert_to_leds_structure(rgbs, offset \\ 0)

View Source
@spec convert_to_leds_structure([Fledex.Color.Types.rgb()], integer()) :: map()
Link to this function

func(leds, func_id, config \\ %{})

View Source
@spec func(t(), atom(), map()) :: t()
@spec get_light(t(), pos_integer()) :: Fledex.Color.Types.colorint()
@spec gradient(t(), map()) :: t()
@spec leds() :: t()
@spec leds(integer()) :: t()
@spec leds(integer(), map()) :: t()
@spec leds(integer(), map(), map()) :: t()
Link to this function

leds(count, leds, opts, meta)

View Source
@spec leds(integer(), map(), map(), map()) :: t()
@spec light(t(), Fledex.Color.Types.colorint() | t() | atom()) :: t()
Link to this function

light(leds, led, offset)

View Source
@spec light(t(), Fledex.Color.Types.colorint() | t() | atom(), pos_integer()) :: t()

offset is 1 indexed. Offset needs to be > 0 if it's bigger than the count then the led will be stored, but ignored

Link to this function

light(leds, led, offset, repeat)

View Source
@spec light(
  t(),
  Fledex.Color.Types.colorint() | t() | atom(),
  pos_integer(),
  pos_integer()
) :: t()
@spec rainbow(t(), map()) :: t()
@spec repeat(t(), %{amount: integer()}) :: t()
Link to this function

rotate(vals, offset, rotate_left \\ true)

View Source
@spec send(t(), map()) :: :ok | {:error, String}
Link to this function

set_driver_info(leds, namespace, server_name \\ Fledex.LedsDriver)

View Source
@spec set_driver_info(t(), namespace :: atom(), server_name :: atom()) :: t()
@spec to_binary(t()) :: binary()
@spec to_list(t()) :: list()[integer()]