View Source Delux.Morse (delux v0.4.1)

Functions for Morse code patterns

Link to this section Summary

Functions

Convert a text string to Morse code

Link to this section Types

@type options() :: [words_per_minute: number(), loop?: boolean()]

Link to this section Functions

Link to this function

encode(c, string, options \\ [])

View Source
@spec encode(Delux.RGB.color(), String.t(), options()) :: Delux.Program.t()

Convert a text string to Morse code

Programs created by this function require more precise timing than most effects. Linux's HZ configuration setting can limit timer precision for blinking LEDs to 10 ms (HZ=100). Please see the README.md for more information and how to configure Delux to partially compensate.

Options:

  • :words_per_minute - the rate at which to send the message
  • :loop? - set to true to repeat the message (defaults to false)