Errata

Code errata listed below are corrected in the code downloads available from this page, and from github.

In numbered list on pages 26 and 27, there should be another step between steps 1 and 2: “100 is less than or equal to 1000, so the loop contents execute.” This makes the for loop description more clear.

In code listing 2-5, there is a missing closing bracket ( } ) following the “current = digitalRead(BUTTON);” line in early prints of the book. This has been fixed in later printings.

In code listing 2-6, the “if” statement for Purple should be an “if else” statement.

Code

All code is licensed via the GNU GPL v3. Code is maintained and updated on GitHub. The download zip linked above always contains the most recent version of the code examples that have been pushed to the GitHub Code Repository.