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
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #iex
- #elixirconf-us
- #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.