View Source Fledex.Leds (fledex v0.1.0)

Link to this section Summary

Link to this section Types

@type colorint() :: 0..16_777_215
@type hsv() :: {hue :: 0..255, saturation :: 0..255, value :: 0..255}
@type rgb() :: {red :: 0..255, green :: 0..255, blue :: 0..255}
@type t() :: %Fledex.Leds{count: integer(), leds: map(), meta: map(), opts: map()}

Link to this section Functions

Link to this function

convert_to_leds_structure(rgbs, offset \\ 0)

View Source
@spec convert_to_leds_structure([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()) :: colorint()
@spec gradient(t(), map()) :: t()
@spec light(t(), colorint() | t() | atom()) :: t()
Link to this function

light(leds, led, offset)

View Source
@spec light(t(), colorint() | t() | atom(), pos_integer()) :: t()
@spec new() :: t()
@spec new(integer()) :: t()
@spec new(integer(), map()) :: t()
@spec new(integer(), map(), map()) :: t()
Link to this function

new(count, leds, opts, meta)

View Source
@spec new(integer(), map(), map(), map()) :: t()
@spec rainbow(t(), map()) :: t()
Link to this function

rotate(vals, offset, rotate_left \\ true)

View Source
@spec rotate([colorint()], pos_integer(), boolean()) :: [colorint()]
@spec send(t(), map()) :: any()
@spec to_binary(t()) :: binary()
@spec to_list(t()) :: list()[integer()]
@spec update(t(), colorint() | rgb() | atom()) :: t()
Link to this function

update(leds, led, offset)

View Source
@spec update(t(), colorint() | t(), 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