adkron / grovepi

Use the GrovePi in Elixir
Apache License 2.0
47 stars 9 forks source link

Add Relay module & update PivotPi doc example #34

Closed axelclark closed 6 years ago

axelclark commented 6 years ago
adkron commented 6 years ago

I like setup

Amos King Binary Noggin

On Oct 28, 2017, at 09:54, Axel Clark notifications@github.com wrote:

@axelclark commented on this pull request.

In lib/grovepi/relay.ex:

  • Digital.write(pin, 0)
  • end
  • @doc """
  • Turns on the appliance, lamp, etc. connected to the relay.
  • """
  • @spec on(GrovePi.pin) :: :ok | {:error, term}
  • def on(pin) do
  • Digital.write(pin, 1)
  • end
  • @doc """
  • Sets the pin mode to output. Required prior to using on/1 or off/1.
  • """
  • @spec start(GrovePi.pin) :: :ok | {:error, term}
  • def start(pin) do What about GrovePi.Relay.setup?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

adkron commented 6 years ago

Or initialize.

Amos King Binary Noggin

On Oct 28, 2017, at 09:54, Axel Clark notifications@github.com wrote:

@axelclark commented on this pull request.

In lib/grovepi/relay.ex:

  • Digital.write(pin, 0)
  • end
  • @doc """
  • Turns on the appliance, lamp, etc. connected to the relay.
  • """
  • @spec on(GrovePi.pin) :: :ok | {:error, term}
  • def on(pin) do
  • Digital.write(pin, 1)
  • end
  • @doc """
  • Sets the pin mode to output. Required prior to using on/1 or off/1.
  • """
  • @spec start(GrovePi.pin) :: :ok | {:error, term}
  • def start(pin) do What about GrovePi.Relay.setup?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

axelclark commented 6 years ago

I made the requested changes. I ended up going with initialize. Let me know if you see anything else you'd like me to change.

adkron commented 6 years ago

Thanks 🤖

axelclark commented 6 years ago

No problem! Thanks for reviewing and providing feedback!