𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Raspberry Pi 5 Essentials: Program, build, and master over 60 projects with Python

✍ Scribed by Dogan Ibrahim


Publisher
Elektor Publication
Year
2024
Tongue
English
Leaves
324
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


The Raspberry Pi 5 is the latest single-board computer from the Raspberry Pi Foundation. It can be used in many applications, such as in audio and video media centers, as a desktop computer, in industrial controllers, robotics, and in many domestic and commercial applications. In addition to the well-established features found in other Raspberry Pi computers, the Raspberry Pi 5 offers Wi-Fi and Bluetooth (classic and BLE), which makes it a perfect match for IoT as well as in remote and Internet-based control and monitoring applications. It is now possible to develop many real-time projects such as audio digital signal processing, real-time digital filtering, real-time digital control and monitoring, and many other real-time operations using this tiny powerhouse.

The book starts with an introduction to the Raspberry Pi 5 computer and covers the important topics of accessing the computer locally and remotely. Use of the console language commands as well as accessing and using the desktop GUI are described with working examples. The remaining parts of the book cover many Raspberry Pi 5-based hardware projects using components and devices such as

  • LEDs and buzzers
  • LCDs
  • Ultrasonic sensors
  • Temperature and atmospheric pressure sensors
  • The Sense HAT
  • Camera modules

Example projects are given using Wi-Fi and Bluetooth modules to send and receive data from smartphones and PCs, and sending real-time temperature and atmospheric pressure data to the cloud.

All projects given in the book have been fully tested for correct operation. Only basic programming and electronics experience are required to follow the projects. Brief descriptions, block diagrams, detailed circuit diagrams, and full Python program listings are given for all projects described.

✦ Table of Contents


Search…
Raspberry Pi 5 Essentials
All rights reserved
Contents
Preface
Chapter 1 β€’ The Raspberry Pi 5
1.1 Overview
1.2 The Raspberry Pi 5
Chapter 2 β€’ Installing the Raspberry Pi 5 Operating System
2.1 Overview
2.2 Using a pre-installed SD card
2.3 Larger font in Console mode
2.4 Accessing your Raspberry Pi 5 Console from your PC – the Putty program
2.4.1 Configuring Putty
2.5 Accessing the Desktop GUI from your PC
2.6 Assigning a static IP address to your Raspberry Pi 5
2.7 Enabling Bluetooth
2.8 Connecting the Raspberry Pi 5 to a wired network
2.8.1 Unable to connect to a wired network
2.9 Installing the Raspberry Pi 5 Bookworm operating system on a blank microSD card
Chapter 3 β€’ Using The Console Commands
3.1 Overview
3.2 The Command Prompt
3.3 Useful Console commands
3.3.1 System and user information
3.3.2 The Raspberry Pi 5 directory structure
3.3.3 Resource monitoring on the Raspberry Pi 5
3.3.4 Shutting Down
3.3.5 Networking
3.3.6 System information and other useful commands
Chapter 4 β€’ Desktop GUI – Desktop Applications
4.1 Overview
4.2 Desktop GUI Applications
4.2.1 Applications Menu
4.2.2 Web browser
4.2.3 File manager
4.2.4 Terminal
4.2.5 Manage Bluetooth devices
4.2.6 Wi-Fi
4.2.7 Volume control
4.2.8 Date and time
Chapter 5 β€’ Using a Text Editor in Console Mode
5.1 nano text editor
5.2 vi text editor
Chapter 6 β€’ Creating and Running a Python Program
6.1 Overview
6.2 Method 1 – Interactively from command prompt in console mode
6.3 Method 2 – Create a Python file in console mode
6.4 Method 3 – Create a Python file in Desktop GUI mode
6.5 Which method?
Chapter 7 β€’ Python Programming and Simple Programs
7.1 Overview
7.2 Variable names
7.3 Reserved words
7.4 Comments
7.5 Line continuation
7.6 Blank lines
7.7 More than one statement on a line
7.8 Indentation
7.9 Python data types
7.10 Numbers
7.11 Strings
7.11.1 String functions
7.11.2 Escape sequences
7.12 Print statement
7.13 List variables
7.13.1 List functions
7.14 Tuple variables
7.15 Dictionary variables
7.15.1 Dictionary functions
7.16 Keyboard input
7.17 Comparison operators
7.18 Logical operators
7.19 Assignment operators
7.20 Control of flow
7.20.1 if, if…else, and elif
7.20.2 for statement
7.20.3 while statement
7.20.4 continue statement
7.20.5 break statement
7.20.6 pass statement
7.21 Example 1 – 4-Band resistor colour code identifier
7.22 Example 2 – Series or parallel resistors
7.23 Example 3 – Resistive potential divider
7.24 Trigonometric functions
7.25 User-defined functions
7.26 Examples
7.27 Recursive functions
7.28 Exceptions
7.29 try/final exceptions
7.30 Date and time
7.31 Creating your own modules
Chapter 8 β€’ Raspberry Pi 5 LED Projects
8.1 Overview
8.2 Raspberry Pi 5 GPIO pin definitions
8.3 Project 1 – Flashing an LED
8.4 Project 2 – Alternately flashing LEDs
8.5 Project 3 – Binary counting with 8 LEDs
8.6 Project 4 – Christmas lights (random flashing 8 LEDs)
8.7 Project 5 – Chasing LEDs
8.8 Project 6 – Rotating LEDs with push-button switch
8.9 Project 7 – Morse Code exerciser with LED or buzzer
8.10 Project 8 – Electronic dice
Chapter 9 β€’ Using an IΒ²C LCD
9.1 Overview
9.2 The IΒ²C Bus
9.3 IΒ²C pins of Raspberry Pi 5
9.4 Project 1 – Using an IΒ²C LCD – Seconds counter
9.5 Project 2 – Using an IΒ²C LCD – Display time
9.6 Project 3 – Using an IΒ²C LCD – Display IP address of Raspberry Pi 5
9.7 Project 4 – Voltmeter – Output to the screen
9.8 Project 5 – Voltmeter – Output to LCD
9.9 Project 6 – Analog temperature sensor thermometer – output to the screen
9.10 Project 7 – Analog temperature sensor thermometer – output on LCD
9.11 Project 8 – Reaction timer – output to screen
9.12 Project 9 – Reaction timer – output to LCD
9.13 Project 10 – Automatic dusk lights
9.14 Project 11 – Ultrasonic distance measurement
9.15 Project 12 – Car parking sensors
9.16 Project 13 – Fading LED
9.17 Project 14 – Melody maker
Chapter 10 β€’ Plotting Graphs with Python and Raspberry Pi 5
10.1 Overview
10.2 The Matplotlib graph plotting library
10.3 Project 1 – RC transient circuit analysis - Charging
10.4 Project 2 – RC transient circuit analysis - Discharging
10.5 Transient RL circuits
10.6 Project 3 – RCL transient circuit analysis
10.7 Project 4 – Temperature, pressure and humidity measurement – Display on the screen
10.8 Project 5 – Temperature, pressure and humidity measurement – Plotting the data
Chapter 11 β€’ Waveform Generation – Using the Digital-to-Analog Converter (DAC)
11.1 Overview
11.2 The MCP4921 DAC
11.3 Project 1 – Generating a square wave signal with any peak voltage up to +3.3 V
11.4 Project 2 – Generating a sawtooth wave signal
11.5 Project 3 – Generating a triangle wave signal
11.6 Project 4 – Generating an arbitrary wave signal
11.7 Project 5 – Generating a sine wave signal
Chapter 12 β€’ Using the Sense HAT
12.1 Overview
12.2 The Sense HAT interface
12.3 Programming the Sense HAT
12.4 Project 1 – Displaying text on Sense HAT
12.5 Project 2 – Test your math skills – multiplication
12.6 Project 3 – Learning the times tables
12.7 Project 4 – Display the temperature, humidity, and pressure
12.8 Project 5 – ON-OFF temperature controller
12.9 Project 6 – Generate two dice numbers
12.10 Project 7 – Display the current time
12.11 Project 8 – Displaying two-digit integer numbers
12.12 Project 9 – Up counter
12.13 The inertial measurement sensor
12.13.1 Project 10 - Reading the acceleration
12.13.2 Project 11 – Accelerometer-based dice
12.13.3 Project 12 – Accelerometer-based LED shapes
Chapter 13 β€’ Using a 4Γ—4 Keypad
13.1 Overview
13.2 Project 1 – Using a 4Γ—4 keypad
Chapter 14 β€’ Communication over Wi-Fi
14.1 Overview
14.2 UDP and TCP
14.2.1 UDP communication
14.2.2 TCP communication
14.3 Project 1 – Sending a text message to a smartphone using TCP/IP
14.4 Project 2 – Two-way communication with the smartphone using TCP/IP
14.5 Project 3 – Communicating with a PC using TCP/IP
14.6 Project 4 – Controlling an LED connected to Raspberry Pi 5 from a smartphone using TCP/IP
14.7 Project 5 – Sending a text message to a smartphone using UDP
14.8 Project 6 – Controlling an LED connected to Raspberry Pi 5 from a smartphone using UDP
14.9 Communicating with the Raspberry Pi Pico W over Wi-Fi
14.9.1 Project 7 – Raspberry Pi 5 and Raspberry Pi Pico W communication – controlling a relay over Wi-Fi
14.10 Project 8 – Storing ambient temperature and atmospheric pressure data on the Cloud
Chapter 15 β€’ Communication over Bluetooth
15.1 Overview
15.2 Project 1 – Exchanging text with a smartphone
15.3 Project 2 – Bluetooth control of LED from a smartphone
15.4 Arduino UNO – Raspberry Pi 5 Bluetooth communication
15.4.1 Project 3 - Communicating with an Arduino UNO over Bluetooth
15.4.2 Project 4 – Play audio (e.g. music) on Bluetooth speaker via Raspberry Pi 5
Chapter 16 β€’ Raspberry Pi 5 Camera Projects
16.1 Overview
16.2 Installing the Camera
16.3 Project 1 – Still camera commands
16.3.1 libcamera
16.4 Project 2 – Building a time-lapse camera – Who is in my parking place?
16.5 Project 3 – Video camera commands
16.6 Project 4 – Who is ringing my doorbell?
Index


πŸ“œ SIMILAR VOLUMES


Raspberry Pi Pico Essentials Program, bu
✍ Dogan Ibrahim πŸ“‚ Library πŸ“… 2021 🌐 English

<span><p>The Raspberry Pi Pico is a high-performance microcontroller module designed especially for physical computing. Microcontrollers differ from single-board computers, like the RaspberryΒ PiΒ 4, in not having an operating system. The Raspberry Pi Pico can be programmed to run a single task very e

Raspberry Pi Pico Essentials: Program, B
✍ Dogan Ibrahim πŸ“‚ Library πŸ“… 2021 πŸ› Elektor Publication 🌐 English

<div> <p>The Raspberry Pi Pico is a high-performance microcontroller module designed especially for physical computing. Microcontrollers differ from single-board computers, like the Raspberry Pi 4, in not having an operating system. The Raspberry Pi Pico can be programmed to run a single task very

Raspberry Pi Pico W: Program, build, and
✍ Dogan Ibrahim πŸ“‚ Library πŸ“… 2022 πŸ› Elektor International Media B.V. 🌐 English

Program, build, and master 60+ projects with the Wireless RP2040 The Raspberry Pi Pico and Pico W are based on the fast, efficient, and low-cost dual-core ARM Cortex M0+ RP2040 microcontroller chip running at up to 133 MHz and sporting 264 KB of SRAM and 2 MB of Flash memory. Besides spacious mem

Python Programming with Raspberry Pi
✍ Sai Yamanoor, Srihari Yamanoor πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

<p><b>Become a master of Python programming using the small yet powerful Raspberry Pi Zero</b></p><h2>About This Book</h2><ul><li>This is the first book on the market that teaches Python programming with Raspberry Pi Zero</li><li>Develop exciting applications such as a mobile robot and home automati

Python Programming with Raspberry Pi
✍ Yamanoor, Sai;Yamanoor, Srihari πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

<p><b>Become a master of Python programming using the small yet powerful Raspberry Pi Zero</b><p><b>About This Book</b><p><li>This is the first book on the market that teaches Python programming with Raspberry Pi Zero<li>Develop exciting applications such as a mobile robot and home automation contro

Python programming with Raspberry Pi Zer
✍ Yamanoor, Sai;Yamanoor, Srihari πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing Ltd 🌐 English

"This step-by-step guide will get you developing practical applications in Python using a Raspberry Pi Zero. It will become a valuable resource as you learn the essential details of interfacing sensors and actuators to a Raspberry Pi, as well as acquiring and displaying data. You will get started by