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

Автор: literator от Сегодня, 16:13, Коментариев: 0

Категория: КНИГИ » АППАРАТУРА

Название: Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5
Автор: 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.

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.

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. You can describe C as a machine-independent assembly language and hence when you learn it you get deeper into the system than with other languages and discover what is really going on. This makes it a good way to improve your understanding of computers and computing in general.

Sometimes you don't need speed, even in an IoT application. For example, if you just want to flash a few LEDs or read a temperature sensor in a human timescale, then you can program in almost any language. Even so, it is good to have plenty of headroom when it comes to speed and memory demands and C excels in these respects. Only when it comes to complex high-level data processing and implementing a sophisticated UI do other languages offer a more compact solution than C. In such cases, a mixed language approach often works. However, for the remainder of this book programming in C is our focus.

Скачать Raspberry Pi Compute Module 5 IoT In C: Using Linux Drivers and Gpio5




ОТСУТСТВУЕТ ССЫЛКА/ НЕ РАБОЧАЯ ССЫЛКА ЕСТЬ РЕШЕНИЕ, ПИШИМ СЮДА!


Нашел ошибку? Есть жалоба? Жми!
Пожаловаться администрации
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.