GrovePi v0.3.2 GrovePi.Buzzer View Source

Control a Grove buzzer. While a buzzer can be controlled solely using GrovePi.Digital, this module provides some helpers.

Example usage:

iex> {:ok, buzzer} = GrovePi.Buzzer.start_link(3)
:ok
iex> GrovePi.Buzzer.buzz(3)
:ok

Link to this section Summary

Link to this section Types

Link to this type duration() View Source
duration() :: integer

Link to this section Functions

Link to this function buzz(pin, duration_or_prefix) View Source
Link to this function buzz(pin, duration, prefix) View Source
buzz(GrovePi.pin, duration, atom) :: :ok
Link to this function off(pin, prefix \\ Default) View Source
Link to this function start_link(pin, opts \\ []) View Source
start_link(GrovePi.pin, atom) :: Supervisor.on_start