fhunleth

fhunleth

Co-author of Nerves

Circuits.GPIO v2.0

Circuits.GPIO lets you read and write to I/O pins on embedded hardware like that used by Nerves. The new v2.0 version makes it possible to support other platforms as well. This is a big update to v1.0 that is mostly backwards compatible but has many improvements that make it worth a look.

Here’s part of the ChangeLog to highlight other v2.0 updates:

  • Nerves and embedded Linux platforms now use the Linux GPIO character device API (cdev) which offers better performance, more functionality and fixes race conditions seen with the previous sysfs implementation

  • Circuits.GPIO.open/3 is much more flexible in how GPIOs are identified. Specifying GPIOs by number still works, but it’s now possible to specify GPIOs by string labels and by tuples that contain the GPIO controller name and index.

  • List out available GPIOs with Circuits.GPIO.enumerate/0. Other helper
    functions are available for getting more information about each GPIO too.

  • Specify pull modes on all hardware that supports them and not just Raspberry Pis

  • Easily do one-off reads and writes with Circuits.GPIO.read_one/2 and
    Circuits.GPIO.write_one/3

  • Must better timestamping of GPIO input events since the timestamps get applied when the kernel processes the event

  • Runtime diagnostics to help debug low level issues. See Circuits.GPIO.Diagnostics

Much more documentation and porting information is available in the hex docs.

Happy hardware hacking!

Where Next?

Popular in News & Updates Top

josevalim
Hi everyone, just a heads up that we announced https://livebook.dev, a website for everyone to learn more about Livebook. One of the coo...
New
fhunleth
We’ve released new versions of all of the officially maintained Nerves Systems. The official systems, nerves_system_rpi0, nerves_system_b...
New
zachdaniel
AshCloak AshCloak is small but mighty! Simply configure the extension, and it will encrypt your attributes :partying_face: Since an exam...
New
DominikWolek
We have released Membrane Core v0.12.1 :tada::tada::tada: This release will help smooth the transition to the upcoming v1.0.0. See the r...
New
bartblast
Hologram’s journey just took a significant leap forward: Curiosum is coming on board as the Main Sponsor, and I’m joining their team to w...
New
zhenfeng-zhu
Nex - A minimalist web framework for indie hackers and startups A Note Before We Begin This document records my thoughts during the dev...
New
fhunleth
Nerves systems provide the operating system, libraries and other tools for building firmware for specific hardware. The Nerves Core Team ...
New
mat-hek
Hi there! So far we’ve been posting news about Membrane & multimedia mostly on X/Twitter, but from now on we’d like to share them on ...
New
fhunleth
The Nerves core team is proud to announce the Nerves v1.8.0 release. Nerves provides the core tooling for creating self-contained, BEAM-...
New
bartblast
Hey there! :slight_smile: We need help completing Elixir’s browser runtime by porting some Erlang functions to JavaScript. Hologram aut...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New

We're in Beta

About us Mission Statement