 defmodule UpsideDownLeds.BlinkingLights do
   use GenServer
 
+  ##
   ## client API
+  ##
 
   @doc """
   Starts the server.

    GenServer.cast(server, {:puts, str |> String.upcase |> String.replace(~r/[^A-Z ]+/, "")})
  end

  ## server callbacks

  @delay_during        500
  @delay_after         500

    {
      :ok,
      %{
        "A" => 13,
        "B" => 16,
        "C" => 21,
        "D" =>  4,
        "E" => 17,
        "F" => 20,
        "G" => 12,
        "H" => 19,
        "I" =>  2,
        "J" => 25,
        "K" =>  3,
        "L" => 14,
        "M" => 15,
        "N" =>  5,
        "O" =>  6,
        "P" => 11,
        "Q" => 27,
        "R" =>  7,
        "S" => 24,
        "T" =>  8,
        "U" => 23,
        "V" => 26,
        "W" => 18,
        "X" => 22,
        "Y" =>  9,
        "Z" => 10,
      } |> Enum.map(fn pair -> {letter, pin_no} = pair; {:ok, pid} = ElixirALE.GPIO.start_link(pin_no, :output); {letter, pid} end)
        |> Enum.into(%{})
    }
