Build a Binary Clock with Elixir and Nerves: Use Layering to Produce Better Embedded Systems

Hunleth, Frank, Tate, Bruce

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2022-09-06
  • 定價: $1,130
  • 售價: 9.5$1,074
  • 貴賓價: 9.0$1,017
  • 語言: 英文
  • 頁數: 108
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680509233
  • ISBN-13: 9781680509236
  • 相關分類: Functional-programming嵌入式系統
  • 立即出貨 (庫存 < 3)

相關主題

商品描述

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.

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.

商品描述(中文翻譯)

想要在編寫 Elixir 程式方面更上一層樓嗎?透過 Nerves 來開發硬體專案吧!在建構這個二進位時鐘的過程中,您將使用 OTP 提供的相同函式庫來增加系統的彈性,這些函式庫也是許多商業電話交換機所使用的。您將以專家的方式處理複雜性,使用分層的方法。透過逐步進行小型、易於驗證的步驟,您將提升自己的除錯技巧,並朝著目標邁進。完成後,您將擁有一個可運作的二進位時鐘,並對硬體系統所需的工作有更深入的了解。您也將能夠將這種理解應用於您所編寫的每一行 Elixir 程式碼中。

將軟體與硬體結合可能會令人沮喪,但只要採取簡單、邏輯的方法,您可以迅速掌握技巧。閃爍單一 LED 是嵌入式系統的傳統 hello-world。建構自己的二進位時鐘是合乎邏輯的下一步。它會根據系統時間閃爍一組 LED。本指南將引導您使用專家們每天用於為硬體開發軟體的技術來完成一個實際專案。

這個實用的專案以微小、邏輯的步驟前進。在進展的過程中,您可以在進入下一步之前驗證每一步。您不需要是 Nerves 的新手,也能從這個專案中受益。在建構自己的桌上型展示品時,成為一個更好的 Elixir 程式設計師。透過軟體設計的分層方法,您將學會像專家一樣控制程式的複雜性,一次專注於系統的一小部分。

完成後,您將擁有自己的二進位時鐘,並且掌握更多設計和建構自己的 Nerves 和 Elixir 專案所需的工具。同時,您也將成為一個更好的程式設計師,對於控制複雜性的分層技術有更深入的了解。

所需材料:

本專案適用於想要開始使用 Nerves 或提升技能的 Elixir 開發人員。本專案設計用於 Elixir 1.11 和 Nerves 1.7,但稍作修改後,較新的版本也可能適用。本專案使用 Raspberry Pi Zero 和一組元件。稍作修改後,您也可以使用其他元件來完成本書的內容。

作者簡介

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 A. Tate is a programmer and CEO of Groxio where he is helping to redefine how computer languages are taught and learned. He's the author of Seven Languages in Seven Weeks, Programming Phoenix LiveView, among other titles, and has been involved with Elixir from the very beginning.

作者簡介(中文翻譯)

Frank Hunleth是一位嵌入式系統程式設計師、開源軟體維護者,以及Nerves核心團隊成員。當他不在電腦前時,他喜歡跑步並與家人共度時光。

Bruce A. Tate是一位程式設計師,也是Groxio的首席執行長,他正在重新定義如何教授和學習電腦語言。他是《七周七語言》、《Programming Phoenix LiveView》等書的作者,並從一開始就參與了Elixir的開發。