CARVIEW |
About This Title
Pages: 106
Published: August 2022
ISBN: 9781680509236
In Print

Build a Binary Clock with Elixir and Nerves
Use Layering to Produce Better Embedded Systems
by Frank Hunleth and Bruce A. Tate
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.
eBook Formats:
PDF for desktop/tablets
epub for Apple Books, e-readers
mobi for Kindle readers
Get all eBook formats here for $18.95 (USD)
Paperback Formats:
Order via Bookshop (U.S. Only)
Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.
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 commonsense 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 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.
What You Need
This project is for Elixir developers who want to get started with Nerves, or improve their skills. The project is designed for Elixir 1.11 and Nerves 1.7, but later versions will probably work as well with slight modifications. The project uses a Raspberry Pi zero with a set of components. With slight modifications, you can make this book work with other components as well.Resources
Releases:
- P1.0 2022/08/02
- B3.0 2022/07/11
- B2.0 2022/02/11
- B1.0 2021/11/03
Contents & Extracts
- The Prototype
- Our Plan
- Burn Firmware
- Make a Circuit
- Build a Program in Layers
- Burn Firmware
- Choose a Computer
- Install Nerves
- Download and Install Firmware
- What You Built
- Build a Circuit
- Build an LED Circuit
- Control the LED from IEx
- What You Built
- Our Plan
- The Working Layered System
- Blink an LED with Software Layers
excerpt
- The Layers of a Nerves Project
- Initialize a Nerves Project from Scratch
- Build a Coreless Boundary
- What You Built
- Build the Clock’s Circuit
excerpt
- Plan the Hardware
- Prepare the Constant Current Driver
- Finish the Hardware
- Test the Hardware and Build the Cabinet
- What You Built
- Write a Clock with a Core
excerpt
- Write the Core
- Adapters Run One System, Three Ways
- Build the Service Layer
- What You Built
- React to Change
- Order a Custom Binary Clock Chip
- Load the LiveBook
- Bringing up the Binary Clock PCB the First Time
- SPI Communication
- Simple Clock
- What You’ll Build
- Blink an LED with Software Layers
excerpt
Author
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, he has been around Elixir from the beginning. He is the founder of Groxio, a company that trains Elixir developers.
eBook Formats:
PDF for desktop/tablets
epub for Apple Books, e-readers
mobi for Kindle readers
Get all eBook formats here for $18.95 (USD)
Paperback Formats:
Order via Bookshop (U.S. Only)
Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.
Releases, Offers & More
Be the first to hear about our newest content, best promotions and upcoming events. Plus get 25% off your next purchase.
Related categories:
Related Titles:

About This Title
Pages: 106
Published: August 2022
ISBN: 9781680509236
Edition: 1
In Print