View Source BrightPi.VirtualBoard (BrightPi v1.0.0)

The virtual board implementation for local development.

The board can be set using application configuration:

config :bright_pi, board: BrightPi.VirtualBoard

It can be started explicitly or via the preferred BrightPi.board/0 helper function.

defmodule MyApp.Application do
  use Application

  @impl true
  def start(_type, _args) do
    children = [
      BrightPi.VirtualBoard, # explicit
      BrightPi.board() # preferred
    ]

    opts = [strategy: :one_for_one, name: MyApp.Supervisor]
    Supervisor.start_link(children, opts)
  end
end

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.