Nerves.Grove
Grove module support for Nerves.
Examples
alias Nerves.Grove
# Button
{:ok, pid} = Grove.Button.start_link(2)
state = Grove.Button.read(pid) # check if button is pressed
# Buzzer
{:ok, pid} = Grove.Buzzer.start_link(117)
Grove.Buzzer.beep(pid, 0.1) # make some noise for 100 msReference
https://hexdocs.pm/nerves_grove/
Modules
| Module | Type | Device |
|---|---|---|
Grove.Button | Digital | Seeed Studio Grove Button |
Grove.Buzzer | Digital | Seeed Studio Grove Buzzer |
Installation
Add nerves_grove to your list of dependencies in your project's mix.exs file:
defp deps do
[{:nerves_grove, "~> 0.2.0"}]
endAlternatively, to pull in the dependency directly from a Git tag:
defp deps do
[{:nerves_grove, github: "bendiken/nerves_grove", tag: "0.2.0"}]
endAlternatively, to pull in the dependency directly from a Git branch:
defp deps do
[{:nerves_grove, github: "bendiken/nerves_grove", branch: "master"}]
end