Note: this error has been corrected in all books currently available for sale, so only affects initial purchasers. Both original and corrected example programs are offered on the website.
On the Arduino Nano Every board, the first two digital pins are labeled TX and RX, rather than their digital pin numbers. I had assumed these were D0 and D1 respectively for consistent pin numbering. However I was wrong. These should be D1 and D0. This affects some illustrations and descriptions in the chapter on the USART, the one-wire USART example program, and the pins.h file. However everything is self-consistent. The error would cause a problem if the Arduino library digital pin functions are used for D0 and D1 as they would be backwards.
It turns out, and I hadn’t noticed until now, that the small format boards like the Nano, Nano Every, and Micro all swap the position of D0 and D1. The Uno format boards like the Uno, Uno Wifi, and Leonardo have the pins in sequential order. Even though I’ve used the Nano before, I hadn’t noticed this because D0 and D1 are generally unusable because the USART is needed for program loading. I only discovered this “feature” today. It’s normally not something I would notice because I alway access the pins directly (using Pins.h) and not by using the digitalRead, digitalWrite, and pinMode functions.