Raspberry Pi 5 IoT In C
Drivers and Gpio5
Errata none
Program Listings
Resources
Buy from: Amazon
The Raspberry Pi 5 is a very capable Linux computer, ideal for use in complex IoT scenarios requiring access to sensors and actuators and running multiple programs at the same time, but the problem is that its hardware is poorly documented. This book demonstrates how to interact with the hardware using Linux drivers and via Gpio5, a new open source IoT library that provides direct access to the Pi 5’s hardware. As the Pi 5 uses the RP1 chip to implement its peripherals, it does not work with the usual IoT libraries such as Wiring Pi, bcm2835, pigpio and so on. Gpio5, is designed to replace them and provide direct access to GPIO, PWM, I2C, SPI and more. This makes the Pi 5 much more capable of IoT applications.
With Linux, the accepted way to access the outside world and other devices is to use drivers. Discovering, installing and using drivers is the topic of early chapters of this book. Having seen how to work with drivers we move on to direct access to the hardware via the Gpio5 library, which is developed and enhanced throughout the book.
Next comes a lightning tour of the electronics needed for simple IoT applications. This is followed by a digression into the Device Tree and overlays using the DHT22 temperature and humidity sensor as a practical example before tackling PWM both via a driver and directly using Gpio5.
From here we tackle the two standard buses, I2C and SPI, in a set of chapters that take us through the basics using both drivers and direct access via Gpio5. We then look at two attempts to impose a higher organization, the hardware monitoring system, hwmon, and Industrial I/O, IIO. The penultimate chapter introduces the PIO first introduced by the Raspberry Pi Pico, a unique way to interface the Pi 5 to the outside world without the need to use the CPU. This goes over the basics and ends with three examples of the most sophisticated PIO programs you are likely to encounter. The final chapter takes drivers to the next level, showing you how to create your own custom overlays by writing fragments of the Device Tree.
Harry Fairhead has worked with microprocessors and electronics for many years and is an enthusiastic proponent of the IoT. C is his programming language of choice and he is the author of Fundamental C: Getting Closer To The Machine and Applying C For The IoT With Linux. His latest Raspberry Pi books are Raspberry Pi IoT In C, 3rd Ed; Raspberry Pi IoT in C With Linux Drivers, 2nd Ed and Programming the Raspberry Pi Pico/W in C, 2nd Ed.
With Linux, the accepted way to access the outside world and other devices is to use drivers. Discovering, installing and using drivers is the topic of early chapters of this book. Having seen how to work with drivers we move on to direct access to the hardware via the Gpio5 library, which is developed and enhanced throughout the book.
Next comes a lightning tour of the electronics needed for simple IoT applications. This is followed by a digression into the Device Tree and overlays using the DHT22 temperature and humidity sensor as a practical example before tackling PWM both via a driver and directly using Gpio5.
From here we tackle the two standard buses, I2C and SPI, in a set of chapters that take us through the basics using both drivers and direct access via Gpio5. We then look at two attempts to impose a higher organization, the hardware monitoring system, hwmon, and Industrial I/O, IIO. The penultimate chapter introduces the PIO first introduced by the Raspberry Pi Pico, a unique way to interface the Pi 5 to the outside world without the need to use the CPU. This goes over the basics and ends with three examples of the most sophisticated PIO programs you are likely to encounter. The final chapter takes drivers to the next level, showing you how to create your own custom overlays by writing fragments of the Device Tree.
Harry Fairhead has worked with microprocessors and electronics for many years and is an enthusiastic proponent of the IoT. C is his programming language of choice and he is the author of Fundamental C: Getting Closer To The Machine and Applying C For The IoT With Linux. His latest Raspberry Pi books are Raspberry Pi IoT In C, 3rd Ed; Raspberry Pi IoT in C With Linux Drivers, 2nd Ed and Programming the Raspberry Pi Pico/W in C, 2nd Ed.
- Publisher : I/O Press (March 3, 2025)
- Language : English
- Paperback : 408 pages
- ISBN-10 : 1871962943
- ISBN-13 : 978-1871962949
- Item Weight : 1.56 pounds
- Dimensions : 7 x 0.92 x 10 inches
- ASIN : B0DZC62M2J
- Publisher : I/O Press (March 4, 2025)
- Language : English Hardcover : 408 page
- ISBN-10 : 1871962315
- ISBN-13 : 978-1871962314
- Item Weight : 1.94 pounds
- Dimensions : 7 x 1.11 x 10 inches
- ASIN : B0DZ361XX6
- Publisher : I/O Press; 1st edition (March 2, 2025)
- Publication date : March 2, 2025
- Language : English
- File size : 6.9 MB
- Format : Print Replica