Skip to content
Permalink
Browse files

Fix Circuits.GPIO calls

  • Loading branch information...
ConnorRigby committed Mar 11, 2019
1 parent 0f36fec commit db506666408632f69b00661a641410eead01bf2e
Showing with 2 additions and 2 deletions.
  1. +2 −2 platform/target/gpio/pin_binding_ale_handler.ex
@@ -38,8 +38,8 @@ defmodule Farmbot.Target.PinBinding.AleHandler do
with {:ok, out_gpio} <- GPIO.open(num, :output),
:ok <- GPIO.write(out_gpio, 0),
:ok <- GPIO.close(out_gpio),
{:ok, gpio} <- GPIO.start_link(num, :input),
:ok <- GPIO.set_int(gpio, :both),
{:ok, gpio} <- GPIO.open(num, :input),
:ok <- GPIO.set_interrupts(gpio, :both),
new_pins <-
Map.put(state.pins, num, %PinState{pin: num, gpio: gpio, state: nil, signal: :rising}) do
{:reply, :ok, %{state | pins: new_pins}}

0 comments on commit db50666

Please sign in to comment.
You can’t perform that action at this time.