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

DominikWolek
After years of developing our framework, we have a release candidate for Membrane Core 1.0! :tada: The new version introduces children g...
New
DominikWolek
Last Friday we released Membrane Core 0.11.0 :tada: A pipeline’s lifecycle has changed: pipeline is now spawned with a dedicated supervi...
New
zachdaniel
Had a great time at Jax.Ex! Gave a talk called “Model your Domain, Derive the Rest”. Thanks to the folks at HashRocket for having me!
New
hugobarauna
A new Livebook version arrives this Friday! :tada: As we count down the days, we will share a sneak peek into what’s coming each day thi...
New
mat-hek
I’m thrilled to announce that for the first time, we’re organizing RTC.ON - the conference about Membrane and multimedia streaming :tada:...
New
hugobarauna
Discover Livebook 0.9’s new security features, including Hubs for centralized secret management, notebook stamping, and a sneak peek into...
New
Jskalc
LiveVue v1.0 released After four release candidates and a lot of community feedback, LiveVue 1.0 is stable :tada: I’ve built a dedicated...
New
DominikWolek
We are launching a cloud-based video streaming platform, which will allow you to use Membrane without all the hassle of maintaining your ...
New
fhunleth
We recently released Nerves 1.5.0 and corresponding updates to the Nerves new project generator, nerves_bootstrap and our official system...
New
zachdaniel
Hey folks, made some recent performance improvements to spark, the tool underlying all of our DSLs. GitHub - ash-project/spark: Tooling f...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42842 311
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41454 115
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126226 1237
New

We're in Beta

About us Mission Statement