water
Device is a Glovary Firewall 6l with GPIO (2x5) on the motherboard.
The header is the not so standard dupont pins 2mm
GPIO is over the super I/O chip: iTE IT8613E
PIN 1 : SIO_PD0 (line 0)
PIN 2 : SIO_PD4 (line 38)
PIN 3 : SIO_PD1 (line 3)
PIN 4 : SIO_PD5 (line 39)
PIN 5 : SIO_PD2 (line 10)
PIN 6 : SIO_PD6 (line 40)
PIN 7 : SIO_PD3 (line 41)
PIN 8 : SIO_PD7 (line 9)
PIN 9 : GND
PIN 10 : VCC
not working:
> Circuits.GPIO.open("GPIO41", :output)
{:error, :not_found}
> Circuits.GPIO.open(41, :output)
{:error, :not_found}
> Circuits.GPIO.enumerate()
[]
> Circuits.GPIO.backend_info()
%{name: Circuits.GPIO.CDev, gpio_number_remapping: :none}
linux (toybox):
> sudo gpioset 0 "41=1" # turn on
> sudo gpioset 0 "41=0" # turn off
> gpioset --version
toybox 0.8.11
linux (libgpiod):
> sudo gpioset -t0 -c gpiochip0 "41=1" # turn on
> sudo gpioset -t0 -c gpiochip0 "41=0" # turn off
> gpioset --version
gpioset (libgpiod) v2.2
Copyright (C) 2017-2023 Bartosz Golaszewski
License: GPL-2.0-or-later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Trending in Questions
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New
When I use Mix.install with a git dependency, using git@github.com:... how do I change the SSH identity used?
I’ve got two Github accoun...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #elixirconf-us
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #elixirconf-eu
- #processes
- #security
- #api
- #forms
- #performance










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
water
@benwilson512
I saw you changed the topic to the nerves section.
Is Circuits.Gpio only on a nerves installation? I’m trying to use the library without nerves.
fhunleth
Hi @water,
My first thought is that it’s a permissions issue and
Circuits.GPIOdoesn’t have access to the GPIOs. I see that you ransudoongpioset. I’m assuming that you’re not running Elixir as root and that if you removed thesudothatgpiosetwouldn’t work either.If it is a permissions issue and your device is running udev, you can add a udev rule to set the group/permissions on
/dev/gpiochip0so that Elixir can access it without running as root. Create a file like/etc/udev/rules.d/99-gpio.rulesfile with the following contents:Then create the
gpiogroup if you don’t already have one. E.g.sudo addgroup gpio. Also make sure that your user is in thegpiogroup in/etc/group.Then reload udev and rerun the rules:
If you look at
/dev/gpiochip0, it should have the right permissions andCircuits.GPIOshould find the GPIOs. You also shouldn’t need to runsudoforgpioset, etc.Hope this helps!
benwilson512
Hey @water that’s my bad, I saw Circuits.GPIO and assumed nerves!
water
thank you.
nixos configuration
water
Writing to the led works.
I can also read from an input.
But
Circuits.GPIO.set_interruptsgives an error and the error message is not clear.The example in the readme is the reverse of my button press result. I don’t think it matters?
water
I can’t get
gpiomonto work either.I’ll change the 2 buttons with switches.
Polling them every 500ms should do the trick.