Ibrahim D. C Programming on Raspberry Pi...projects in C 2021.pdf

(45638 KB) Pobierz
books
C Programming
on Raspberry Pi
Develop innovative hardware-based projects in C
Dogan Ibrahim
C Programming
on Raspberry Pi
Dogan Ibrahim
design
>
share
>
sell
an Elektor Publication
This is an Elektor Publication. Elektor is the media brand of
Elektor International Media B.V.
78 York Street
London W1H 1DP, UK
Phone: (+44) (0)20 7692 8344
© Elektor International Media BV 2021
First published in the United Kingdom 2021
photocopying, or storing in any medium by electronic means and whether or not transiently or incidentally
to some other use of this publication, without the written permission of the copyright holder except in
accordance with the provisions of the Copyright, Designs and Patents Act 1988 or under the terms of a
licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London, England W1P 9HE.
Applications for the copyright holder's written permission to reproduce any part of this publication should be
addressed to the publishers. The publishers have used their best efforts in ensuring the correctness of the
information contained in this book. They do not assume, and hereby disclaim, any liability to any party for
any loss or damage caused by errors or omissions in this book, whether such errors or omissions result from
negligence, accident or any other cause.
All rights reserved. No part of this book may be reproduced in any material form, including
British Library Cataloguing in Publication Data
Catalogue record for this book is available from the British Library
ISBN: 978-3-89576-431-8
EISBN: 978-3-89576-432-5
EPUB: 978-3-89576-433-2
Prepress production: DMC ¦ daverid.com
Printed in the Netherlands by Wilco
design
>
share
>
sell
Elektor is part of EIM, the world's leading source of essential technical information and electronics products for pro
engineers, electronics designers, and the companies seeking to engage them. Each day, our international team develops
and delivers high-quality content - via a variety of media channels (e.g., magazines, video, digital media, and social media)
in several languages - relating to electronics design and DIY electronics.
www.elektor.com
To my wife Nadire, my daughter Alev, and my son Ahmet, for their love and wisdom.
C Programming on Raspberry Pi
● Preface
The Raspberry Pi 4 is the latest credit-card sized computer that can be used in many
applications, such as audiovisual media centers, desktop computers, industrial control,
robotics, and many more domestic and commercial applications. In addition to the many
features found in other versions of Raspberry Pi, The Pi 4 also offers Wi-Fi and Bluetooth,
making it highly desirable in remote and internet-based control and monitoring applications.
The Raspberry Pi has traditionally been programmed using Python. Although Python is
a very powerful language, many programmers may not be familiar with using it. The C
language is probably the most commonly used programming languages. All embedded
microcontrollers can be programmed using the C language these days. The C language
is taught in all technical colleges and universities - almost all engineering students are
familiar with the use of this language in their projects.
This book is about using C with Raspberry Pi to develop various hardware-based projects.
Two of the most popular C libraries, wiringPi and pigpio are used.
The book starts with an introduction to the C language and most students and newcomers
will find this chapter invaluable. Many projects are provided in the book, including using
Wi-Fi and Bluetooth to establish communication with smartphones.
The book includes many sensors and hardware-based projects. Both wiringPi and pigpio
libraries are used in all projects. Complete program listings are given with full explanations.
All projects given in the book have been fully tested and work. The following sub-headings
are used in the projects where applicable:
Project title
Project description
Aim of the project
Block diagram
Circuit diagram
Program listing
wiringPi and pigpio program listings of all Raspberry Pi projects developed in the book are
available on the Elektor website. Readers can download and use these programs in their
projects. Alternatively, they can modify the supplied programs to suit their applications.
I hope readers find this book helpful and enjoy reading it.
Prof Dr Dogan Ibrahim
January 2021
London.
6
Zgłoś jeśli naruszono regulamin