
Автор: Harry Fairhead
Издательство: I/O Press
Год: 2025
Страниц: 442
Язык: английский
Формат: pdf (true), epub
Размер: 10.1 MB
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. C is a good language to use for low-level apps. It is the language that Linux is written in, as are all of the Linux drivers that we are going to use in the rest of the book. It is fast and efficient and you can tailor your code to make the best of the hardware you have.