Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5

Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5

Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5

Author: Harry Fairhead (Author)

Publisher finelybook 出版社:‏ I/O Press

Publication Date 出版日期: 2025-04-11

Language 语言: English

Print Length 页数: 442 pages

ISBN-10: 1871962951

ISBN-13: 9781871962956

Book Description

The Raspberry Pi Compute Module 5, CM5, is designed specifically to be used in IoT and embedded applications, but differs considerably from other IoT devices you might be familiar with. The key difference is that it has enough power to run an operating system, usually Linux. This makes it ideal for use in complex IoT scenarios requiring access to sensors and actuators and running multiple programs at the same time, but this is made difficult due to a lack of documentation. The problems are exacerbated by the use of the RP1 chip to implement the CM5’s peripherals which means it doesn’t work with the usual IoT libraries such as Wiring Pi, bcm2835, pigpio and so on. This book demonstrates how to interact with the hardware both using Linux drivers, the accepted way of accessing external devices, and via Gpio5, a new open source IoT library specifically for the Raspberry Pi 5 and CM5, that provides direct access to the CM5’s hardware, with functions for working with GPIO, PWM, I2C, SPI and more.

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. The same treatment is applied to the two standard buses, I2C and SPI and also the 1-wire bus. We then look at two attempts to impose a higher organization, the hardware monitoring system, hwmon, and Industrial I/O, IIO.

We next come to the PIO, the Programmable Input Output, first introduced by the Raspberry Pi Pico, a unique way to interface the CM5 to the outside world without the need to use the CPU. After covering the basics, we look at three examples of the most sophisticated PIO programs you are likely to encounter.
The penultimate chapter takes drivers to the next level, showing you how to create your own custom overlays by writing fragments of the device tree, and the final chapter is about advanced scheduling and dealing with problems encountered in running a real-time system.

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 Raspberry Pi books include Raspberry Pi 5 IoT In C: Drivers and Gpio5, the companion volume to this book, 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.

Amazon Page

下载地址

PDF | 4 MB | 2025-05-21
下载地址 Download解决验证以访问链接!
打赏
未经允许不得转载:finelybook » Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5

评论 抢沙发

觉得文章有用就打赏一下

您的打赏,我们将继续给力更多优质内容

支付宝扫一扫

微信扫一扫