Nerves.Grove v0.5.0 Nerves.Grove.LED

Seeed Studio Grove LED

Example

alias Nerves.Grove.LED

{:ok, pid} = LED.start_link(pin)

LED.blink(pid)

Summary

Functions

Blinks the LED for a specified duration

Switches off the LED

Switches on the LED

Functions

blink(pid, duration \\ 0.2)

Specs

blink(pid, number) :: any

Blinks the LED for a specified duration.

off(pid)

Specs

off(pid) :: any

Switches off the LED.

on(pid)

Specs

on(pid) :: any

Switches on the LED.

start_link(pin)

Specs

start_link(pos_integer) :: {:ok, pid} | {:error, any}