You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iex(1)> {:ok, gpio} = Circuits.GPIO.open(26, :input)
{:ok, #Reference<0.1962860034.377356295.248080>}
iex(2)> Circuits.GPIO.read(gpio)
0 # button is not pushed
iex(3)> Circuits.GPIO.read(gpio)
0 # button is pushed, but can't read its value
iex(4)> {:ok, gpio} = Circuits.GPIO.open(26, :output) # once configure with output
{:ok, #Reference<0.1962860034.377356295.248081>}
iex(5)> {:ok, gpio} = Circuits.GPIO.open(26, :input) # make it back to input
{:ok, #Reference<0.1962860034.377356295.248082>}
iex(6)> Circuits.GPIO.read(gpio)
0 # button is not pushed
iex(7)> Circuits.GPIO.read(gpio)
1 # button is pushed, now can read its value
This doesn't happen with debian which boots with same kernel and same dtb.
In below code, GPIO pin 26 is D18 of Grove Base Hat for Raspberry Pi.
This doesn't happen with debian which boots with same kernel and same dtb.
So, this might be a contribution chance to circuits_gpio.
The text was updated successfully, but these errors were encountered: