Nerves.Grove v0.4.0 Nerves.Grove.Buzzer

Seeed Studio Grove Buzzer

Example

alias Nerves.Grove.Buzzer

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

Buzzer.beep(pid, 0.1)  # make some noise for 100 ms

Summary

Functions

Beeps the buzzer

Turns off the buzzer

Turns on the buzzer

Functions

beep(pid, duration \\ 0.1)

Specs

beep(pid, number) :: any

Beeps the buzzer.

off(pid)

Specs

off(pid) :: any

Turns off the buzzer.

on(pid)

Specs

on(pid) :: any

Turns on the buzzer.

start_link(pin)

Specs

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