View Source API Reference fledex v0.2.0

Modules

This module should provide some simple macros that allow to define the led strip and to update it. The code you would write (in livebook) would look something like the following: iex> use Fledex iex> led_strip do

Most functions are reimplementations from FastLED. Here is a detailed explanation of those functions: https://github.com/FastLED/FastLED/wiki/High-performance-math

The client often wants to run some animations. This can of course be done by repeatedly updating the Leds definitions and calling Leds.send() to send it to the driver. This often results in constructs like the following:application

This is a dummy implementation of the LedStripDriver that dumps the binaries to IO. This can be useful if you want to run some tests without real hardware. The real implementatin probably opens a channel (if not already open) to the bus (like SPI) sends the data to the bus.

This is a dummy implementation of the LedStripDriver that doesn't do anything (similar to a /dev/null device). This can be useful if you want to run some tests without getting any output or sending it to hardware.

This module defines a GenServer that manages the LED strip (be it a real one with the SpiDriver or a virtual one with e.g. the KinoDriver). Usually you only want to start one server, even though it is possible to start several. The LedsDriver will take several Leds definitions and merge them together to be displayed on a single LED strip The role the LedsDriver plays is similar to the one a window server plays on a normal computer