If you've started to work with Raspberry Pi, you know that Raspberry Pi's capabilities are continually expanding. The fourth edition of this popular cookbook provides more than 200 hands-on recipes (complete with code) that show you how to run this tiny low-cost computer with Linux, program it with Python, hook it up to sensors and motors, and use it with the internet of things (IoT). This new edition includes new chapters on the Raspberry Pi Pico and Machine Learning with the Raspberry Pi.
Although many languages can be used to program the Raspberry Pi, Python is the most popular. In fact, the Pi in Raspberry Pi is inspired by the word python. Although Python’s most recent version, Python 3, has been around for years, you’ll find that a lot of people still use Python 2. Python 3 (the default for Raspberry Pi OS) is run by using either of the commands python or Python 3. The examples in this book are written for Python 3 unless otherwise stated. Most will run on both Python 2 and Python 3 without modification. This reluctance on the part of the Python community to ditch the older version is largely because Python 3 introduced some changes that broke compatibility with version 2. As a result, some of the huge body of third-party libraries developed for Python 2 won’t work under Python 3. My strategy is to write in Python 3 whenever possible, reverting Python 2 only when I need to because of compatibility problems.
This edition has been thoroughly updated to encompass the new models of Raspberry Pi, as well as the many changes and improvements to its Raspberry Pi OS. In particular you will find new chapters on:
• Machine Learning
• Raspberry Pi Pico and Pico W
This book is designed so that you can read it linearly, as you would a regular book, or access recipes at random. You can search the table of contents or index for the recipe that you want and then jump directly to it. If the recipe requires you to know about other things, it will refer you to other recipes, rather like a cookbook might refer you to base sauces before showing you how to cook something fancier.
The world of Raspberry Pi moves quickly. With a large, active community, new interface boards and software libraries are being developed all the time. In addition to examples that use specific interface boards or software, the book also covers basic principles so that you can have a better understanding of how to use new technologies that come along as the Raspberry Pi ecosystem develops.
Author(s): Dr. Simon Monk
Publisher: O'Reilly Media, Inc.
Year: 2023
Language: English
Pages: 621