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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
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
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











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.