Closed axelclark closed 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
oroff/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.
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
oroff/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.
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.
Thanks 🤖
No problem! Thanks for reviewing and providing feedback!
ComponentTestCase
. I think the testing & module are simpler without handlingprefix
. Also, to unit test the Relay module, I only needGrovePi.I2C
and not the Registries started withGrovePi.Supervisor
since I'm not using the Poller. However let me know what you think, I may be missing something.alias GrovePi.PivotPi