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

bartblast
Hi folks, For anyone following Hologram’s development or curious about running Elixir in the browser, I’ve created the Client Runtime Re...
New
martosaur
InstructorLite - v1.1.1 and v1.1.2 Pass Gemini token in request header rather than in request parameter (as is shown in API reference :...
New
sorenone
The title doesn’t relay the depth of this announcement, but it is short, balanced, and looked good to us. From open sourcing multiple pac...
New
zachdaniel
We’re working hard on improving docs, and have some substantial things that it would be great to get some thoughts on. One of the bigges...
New
New
zachdaniel
:police_car_light: New AshAuthentication Installers :police_car_light: The AshAuthentication igniter installers are released! Today on s...
New
fhunleth
Nerves v1.14.3 has been released. Changes Remove warning when using Elixir 1.20 Minor doc updates throughout
New
jjcarstens
Testing code destined for hardware can be tricky, but it just got one tiny bit easier! :tty0tty was just released which is an Elixir por...
New
bartblast
I’m excited to announce Hologram v0.5.0, a major evolution of the full-stack Elixir web framework! This release brings massive performanc...
New
bartblast
This thread is for updates on the Hologram website (docs, new pages, roadmap, feature status, etc.). You can watch this thread to get no...
New

Other popular topics Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
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
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
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement