PragmaticBookshelf

PragmaticBookshelf

Forum Sponsor

Build a Binary Clock with Elixir and Nerves (PragProg)

Frank Hunleth @fhunleth
Bruce A. Tate @redrapids

edited by Jacquelyn Carter @jkcarter

Want to get better at coding Elixir? Write a hardware project with Nerves. As you build this binary clock, you’ll build in resiliency using OTP, the same libraries powering many commercial phone switches. You’ll attack complexity the way the experts do, using a layered approach. You’ll sharpen your debugging skills by taking small, easily verified steps toward your goal. When you’re done, you’ll have a working binary clock and a good appreciation of the work that goes into a hardware system. You’ll also be able to apply that understanding to every new line of Elixir you write.

Combining software with hardware can be frustrating, but you can become proficient in no time by taking a simple, logical approach. Blinking a single LED is the traditional “hello-world” of embedded systems. Building your own binary clock is the logical next step. It blinks groupings of LEDs based on the system time. This guide walks you through a working project using the techniques used by experts who build software for hardware every day.

This common sense project moves forward in tiny, logical steps. As you progress, you can verify each step before moving on to the next. You don’t have to be a Nerves novice to benefit from this project. Become a better Elixir programmer as you build your own desktop showpiece. With a layered approach to software design, you’ll learn to control the complexity of your programs the way the experts do by focusing on one small slice of your system at a time.

When you’re done, you’ll have your own binary clock, and also more of the tools you need to design and build your own Nerves and Elixir projects. You’ll also be a better programmer with a deeper appreciation of layering techniques for controlling complexity.


Frank Hunleth is an embedded systems programmer, OSS maintainer, and Nerves core team member. When not in front of a computer, he loves running and spending time with his family.

Bruce Tate is a kayaker, programmer, and father of two from Chattanooga, Tennessee. The author of more than 10 books has been around Elixir from the beginning. He is the founder of Groxio, a company that trains Elixir developers.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

Most Liked

fhunleth

fhunleth

Co-author of Nerves

During the course of working on this book, I learned that Bruce really enjoys working with wood and had a lot of fun with that aspect. However, this is not a wood working or metal working book.

The focus is on designing embedded software using Elixir. It’s important to view the binary clock as an example project. If you were only interested in building a binary clock, Nerves and Elixir are overkill. However, the binary clock is a place to start if you’re looking to learn the basics and how to build your programs for larger embedded projects.

The Weather Station book is similar, but takes a different view at the software and focuses on reporting and displaying sensor data. In that case as well, you won’t have a full fledged weather station at the end, but you will know quite a bit more on the software side.

Since it sounds like you’re interested in the end product looks, I think that you’d be more satisfied not buying the book and instead following the build instructions for a Raspberry Pi clock you like. Perhaps the programming language doesn’t matter. Or maybe you can install Nerves Livebook and write a small notebook to control it. If you’d like to see how to move your project to be a self-contained firmware image with Nerves and pull in networking and more all in Elixir, these books will help. You’ll hopefully feel better about buying them then, too.

Hope this helps.

Where Next?

Popular in Books Top

PragmaticBookshelf
Joseph Koski Series editor: Sophie DeBenedetto @SophieDeBenedetto Developmental editor Adaobi Obi Tulton @aotulton Combine advanced fu...
New
CinderellaMan
Create a cryptocurrency trading bot in Elixir (YouTube videos, ebook pay what you want) <span class="hashtag-icon-placeholder"></span>eli...
New
wintermeyer
At https://elixir-phoenix-ash.com I publish training material for Elixir and Phoenix. Text base tutorials which start at zero. Recently I...
New
collegeimprovements
https://imagery.pragprog.com/products/579/lmelixir.jpg?1591050736 by @whatyouhide and @idlehands Elixir offers new paradigms, and chal...
New
PragmaticBookshelf
Rebecca Le and Zach Daniel @zachdaniel _edited by Kelly Lee @k.lee _ Ash Framework is the game-changing toolkit for Elixir developers. W...
New
PragmaticBookshelf
Peter Ullrich (@PJUllrich) edited by Michael Swaine @michaelswaine Data is at the core of every business, but it is useless if nobody ca...
New
PragmaticBookshelf
Stephen Bussey @sb8244 edited by Jacquelyn Carter @jkcarter Elixir will change the way you think about programming. Use your Ruby experi...
New
jack-s9
Simplify and streamline your Elixir Phoenix Deployments. Deploy with tools that are easy to use, maximize Elixir’s features, and have ex...
New
AstonJ
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ :023: Current: Search Original: Search For those looking for ...
New
AstonJ
by Ben Marx, José Valim, Bruce Tate Bring Elixir into your company, with real-life strategies from the people who built Elixir and use i...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
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
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
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
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement