Raspberry Pi Cookbook: Software and Hardware Problems and Solutions

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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. These easy-to-use recipes will show you, step-by-step, how to: • Set up your Raspberry Pi and connect to a network • Work with its Linux-based operating system • Program your Raspberry Pi with Python • Give your Pi "eyes" with computer vision • Recognize objects from video and sounds using machine learning • Control hardware through the GPIO connector • Use your Raspberry Pi to run different types of motors • Work with switches, keypads, and other digital inputs • Use sensors to measure temperature, light, and distance • Connect to IoT devices in various ways and automate your home • Use the Raspberry Pi Pico microcontroller board with your Raspberry Pi

Author(s): Simon Monk
Edition: 4
Publisher: O'Reilly Media
Year: 2023

Language: English
Commentary: Publisher's PDF
Pages: 618
City: Sebastopol, CA
Tags: Linux;Wi-Fi;Machine Learning;Computer Vision;OpenCV;Python;Internet of Things;Hardware;Raspberry Pi;IFTTT;Networking;Home Automation;SSH;Web Servers;GPS Tracking;pySerial;I²C Bus;Bluetooth;Sensors;Electronics;Transistors;Virtual Network Computing;GPIO;Accelerometer;Breadboard;Raspberry Squid;DC Motors;Relays;Batteries;Displays;LEDs;Thermistors;Pressure Sensors;Humidity Sensors;Light Sensors;TensorFlow Lite;Sound;ThingSpeak;Raspberry Pi Pico;Raspberry Pi OS;Node-RED;CheerLights;Sonoff

Cover
Copyright
Table of Contents
Preface to the Fourth Edition
Using This Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Setup and Management
1.0 Introduction
1.1 Selecting a Model of Raspberry Pi
Problem
Solution
Discussion
See Also
1.2 Connecting the System
Problem
Solution
Discussion
See Also
1.3 Enclosing a Raspberry Pi
Problem
Solution
Discussion
See Also
1.4 Selecting a Power Supply
Problem
Solution
Discussion
See Also
1.5 Selecting an Operating System
Problem
Solution
Discussion
See Also
1.6 Installing an Operating System Using Raspberry Pi Imager
Problem
Solution
Discussion
See Also
1.7 Booting Up Your Raspberry Pi for the First Time
Problem
Solution
Discussion
See Also
1.8 Setting Up a Headless Raspberry Pi
Problem
Solution
Discussion
See Also
1.9 Booting from a Real Hard Disk or USB Flash Drive
Problem
Solution
Discussion
See Also
1.10 Connecting a DVI or VGA Monitor
Problem
Solution
Discussion
See Also
1.11 Using a Composite Video Monitor/TV
Problem
Solution
Discussion
See Also
1.12 Adjusting the Picture Size on Your Monitor
Problem
Solution
Discussion
See Also
1.13 Maximizing Performance
Problem
Solution
Discussion
See Also
1.14 Changing Your Password
Problem
Solution
Discussion
See Also
1.15 Shutting Down Your Raspberry Pi
Problem
Solution
Discussion
See Also
1.16 Installing the Raspberry Pi Camera Module
Problem
Solution
Discussion
See Also
1.17 Using Bluetooth
Problem
Solution
Discussion
See Also
Chapter 2. Networking
2.0 Introduction
2.1 Connecting to a Wired Network
Problem
Solution
Discussion
See Also
2.2 Finding Your IP Address
Problem
Solution
Discussion
See Also
2.3 Setting a Static IP Address
Problem
Solution
Discussion
See Also
2.4 Setting the Network Name of a Raspberry Pi
Problem
Solution
Discussion
See Also
2.5 Setting Up a Wireless Connection
Problem
Solution
Discussion
See Also
2.6 Connecting with a Console Lead
Problem
Solution
Discussion
See Also
2.7 Controlling the Pi Remotely with SSH
Problem
Solution
Discussion
See Also
2.8 Controlling the Pi Remotely with VNC
Problem
Solution
Discussion
See Also
2.9 Using a Raspberry Pi for Network-Attached Storage
Problem
Solution
Discussion
See Also
2.10 Setting Up a Network Printer
Problem
Solution
Discussion
See Also
Chapter 3. Operating System
3.0 Introduction
3.1 Browsing Files Graphically
Problem
Solution
Discussion
See Also
3.2 Copying Files onto a USB Flash Drive
Problem
Solution
Discussion
See Also
3.3 Starting a Terminal Session
Problem
Solution
Discussion
See Also
3.4 Navigating the Filesystem Using a Terminal
Problem
Solution
Discussion
See Also
3.5 Copying a File or Folder
Problem
Solution
Discussion
See Also
3.6 Renaming a File or Folder
Problem
Solution
Discussion
See Also
3.7 Editing a File
Problem
Solution
Discussion
See Also
3.8 Viewing the Contents of a File
Problem
Solution
Discussion
See Also
3.9 Creating a File Without Using an Editor
Problem
Solution
Discussion
See Also
3.10 Creating a Directory
Problem
Solution
Discussion
See Also
3.11 Deleting a File or Directory
Problem
Solution
Discussion
See Also
3.12 Performing Tasks with Superuser Privileges
Problem
Solution
Discussion
See Also
3.13 Understanding File Permissions
Problem
Solution
Discussion
See Also
3.14 Changing File Permissions
Problem
Solution
Discussion
See Also
3.15 Changing File Ownership
Problem
Solution
Discussion
See Also
3.16 Making a Screen Capture
Problem
Solution
Discussion
See Also
3.17 Installing Software with apt
Problem
Solution
Discussion
See Also
3.18 Removing Software Installed with apt
Problem
Solution
Discussion
See Also
3.19 Installing Python Packages with pip3
Problem
Solution
Discussion
See Also
3.20 Fetching Files from the Command Line
Problem
Solution
Discussion
See Also
3.21 Fetching Source Code with Git
Problem
Solution
Discussion
See Also
3.22 Fetching This Book’s Accompanying Code
Problem
Solution
Discussion
See Also
3.23 Running a Program Automatically on Startup
Problem
Solution
Discussion
See Also
3.24 Running a Program Automatically as a Service
Problem
Solution
Discussion
See Also
3.25 Running a Program Automatically at Regular Intervals
Problem
Solution
Discussion
See Also
3.26 Finding a File
Problem
Solution
Discussion
See Also
3.27 Using the Command-Line History
Problem
Solution
Discussion
See Also
3.28 Monitoring Processor Activity
Problem
Solution
Discussion
See Also
3.29 Working with File Archives
Problem
Solution
Discussion
See Also
3.30 Listing Connected USB Devices
Problem
Solution
Discussion
3.31 Redirecting Output from the Command Line to a File
Problem
Solution
Discussion
See Also
3.32 Concatenating Files
Problem
Solution
Discussion
See Also
3.33 Using Pipes
Problem
Solution
Discussion
See Also
3.34 Hiding Output to the Terminal
Problem
Solution
Discussion
See Also
3.35 Running Programs in the Background
Problem
Solution
Discussion
See Also
3.36 Creating Command Aliases
Problem
Solution
Discussion
See Also
3.37 Setting the Date and Time
Problem
Solution
Discussion
3.38 Finding Out How Much Room You Have on the SD Card
Problem
Solution
Discussion
See Also
3.39 Finding Out What Operating System Version You Are Running
Problem
Solution
Discussion
See Also
3.40 Updating Raspberry Pi OS
Problem
Solution
Discussion
See Also
Chapter 4. Using Ready-Made Software
4.0 Introduction
4.1 Making a Media Center
Problem
Solution
Discussion
See Also
4.2 Installing Recommended Software
Problem
Solution
Discussion
See Also
4.3 Using Office Software
Problem
Solution
Discussion
See Also
4.4 Running a Vintage Game Console Emulator
Problem
Solution
Discussion
See Also
4.5 Turning Your Raspberry Pi into a Radio Transmitter
Problem
Solution
Discussion
See Also
4.6 Editing Bitmap Images
Problem
Solution
Discussion
See Also
4.7 Editing Vector Images
Problem
Solution
Discussion
See Also
4.8 Using Bookshelf
Problem
Solution
Discussion
See Also
4.9 Playing Internet Radio
Problem
Solution
Discussion
See Also
4.10 Using Visual Studio Code
Problem
Solution
Discussion
See Also
4.11 Controlling a Laser Cutter
Problem
Solution
Discussion
See Also
Chapter 5. Python Basics
5.0 Introduction
5.1 Deciding Between Python 2 and Python 3
Problem
Solution
Discussion
See Also
5.2 Choosing a Python Editor
Problem
Solution
Discussion
See Also
5.3 Editing Python Programs with Thonny
Problem
Solution
Discussion
See Also
5.4 Editing Python Programs with Mu
Problem
Solution
Discussion
See Also
5.5 Using the Python Console
Problem
Solution
Discussion
See Also
5.6 Running Python Programs from the Terminal
Problem
Solution
Discussion
See Also
5.7 Assigning Names to Values (Variables)
Problem
Solution
Discussion
See Also
5.8 Displaying Output
Problem
Solution
Discussion
See Also
5.9 Reading User Input
Problem
Solution
Discussion
See Also
5.10 Using Arithmetic Operators
Problem
Solution
Discussion
See Also
5.11 Creating Strings
Problem
Solution
Discussion
See Also
5.12 Concatenating (Joining) Strings
Problem
Solution
Discussion
See Also
5.13 Converting Numbers into Strings
Problem
Solution
Discussion
See Also
5.14 Converting Strings into Numbers
Problem
Solution
Discussion
See Also
5.15 Finding the Length of a String
Problem
Solution
Discussion
See Also
5.16 Finding the Position of One String Within Another
Problem
Solution
Discussion
See Also
5.17 Extracting Part of a String
Problem
Solution
Discussion
See Also
5.18 Replacing One String of Characters with Another Within a String
Problem
Solution
Discussion
See Also
5.19 Converting a String to Uppercase or Lowercase
Problem
Solution
Discussion
See Also
5.20 Running Commands Conditionally (if)
Problem
Solution
Discussion
See Also
5.21 Comparing Values
Problem
Solution
Discussion
See Also
5.22 Using Logical Operators
Problem
Solution
Discussion
See Also
5.23 Repeating Instructions an Exact Number of Times
Problem
Solution
Discussion
See Also
5.24 Repeating Instructions Until Some Condition Changes
Problem
Solution
Discussion
See Also
5.25 Breaking Out of a Loop
Problem
Solution
Discussion
See Also
5.26 Defining a Function in Python
Problem
Solution
Discussion
See Also
Chapter 6. Python Lists and Dictionaries
6.0 Introduction
6.1 Creating a List
Problem
Solution
Discussion
6.2 Accessing Elements of a List
Problem
Solution
Discussion
6.3 Finding the Length of a List
Problem
Solution
Discussion
6.4 Adding Elements to a List
Problem
Solution
Discussion
6.5 Removing Elements from a List
Problem
Solution
Discussion
6.6 Creating a List by Parsing a String
Problem
Solution
Discussion
See Also
6.7 Iterating Over a List
Problem
Solution
Discussion
See Also
6.8 Enumerating a List
Problem
Solution
Discussion
See Also
6.9 Testing if Something Is in a List
Problem
Solution
Discussion
See Also
6.10 Sorting a List
Problem
Solution
Discussion
6.11 Cutting Up a List
Problem
Solution
Discussion
See Also
6.12 Using Comprehensions
Problem
Solution
Discussion
See Also
6.13 Creating a Dictionary
Problem
Solution
Discussion
See Also
6.14 Accessing a Dictionary
Problem
Solution
Discussion
See Also
6.15 Removing Entries from a Dictionary
Problem
Solution
Discussion
6.16 Iterating Over Dictionaries
Problem
Solution
Discussion
See Also
Chapter 7. Advanced Python
7.0 Introduction
7.1 Formatting Numbers
Problem
Solution
Discussion
See Also
7.2 Formatting Dates and Times
Problem
Solution
Discussion
See Also
7.3 Returning More Than One Value
Problem
Solution
Discussion
See Also
7.4 Defining a Class
Problem
Solution
Discussion
See Also
7.5 Defining a Method
Problem
Solution
Discussion
See Also
7.6 Inheritance
Problem
Solution
Discussion
See Also
7.7 Writing to a File
Problem
Solution
Discussion
See Also
7.8 Reading from a File
Problem
Solution
Discussion
See Also
7.9 Using Pickling to Save and Load Data in a File
Problem
Solution
Discussion
See Also
7.10 Handling Exceptions
Problem
Solution
Discussion
See Also
7.11 Using Modules
Problem
Solution
Discussion
See Also
7.12 Generating Random Numbers
Problem
Solution
Discussion
See Also
7.13 Making Web Requests from Python
Problem
Solution
Discussion
See Also
7.14 Specifying Command-Line Arguments in Python
Problem
Solution
Discussion
See Also
7.15 Running Linux Commands from Python
Problem
Solution
Discussion
See Also
7.16 Sending Email from Python
Problem
Solution
Discussion
See Also
7.17 Writing a Simple Web Server in Python
Problem
Solution
Discussion
See Also
7.18 Doing Nothing in Python
Problem
Solution
Discussion
See Also
7.19 Doing More Than One Thing at a Time
Problem
Solution
Discussion
See Also
7.20 Parsing JSON Data
Problem
Solution
Discussion
See Also
7.21 Saving Dictionaries as JSON Files
Problem
Solution
Discussion
See Also
7.22 Creating User Interfaces
Problem
Solution
Discussion
See Also
7.23 Using Regular Expressions to Search for Patterns in Text
Problem
Solution
Discussion
See Also
7.24 Using Regular Expressions to Validate Data Entry
Problem
Solution
Discussion
See Also
7.25 Using Regular Expressions for Web Scraping
Problem
Solution
Discussion
See Also
Chapter 8. Computer Vision
8.0 Introduction
8.1 Installing OpenCV
Problem
Solution
Discussion
See Also
8.2 Setting Up a USB Camera for Computer Vision
Problem
Solution
Discussion
See Also
8.3 Using a Raspberry Pi Camera Module for Computer Vision
Problem
Solution
Discussion
See Also
8.4 Counting Coins
Problem
Solution
Discussion
See Also
8.5 Face Detection
Problem
Solution
Discussion
See Also
8.6 Motion Detection
Problem
Solution
Discussion
See Also
8.7 Extracting Text from an Image
Problem
Solution
Discussion
See Also
Chapter 9. Machine Learning
9.0 Introduction
9.1 Identifying Objects in Video with TensorFlow Lite
Problem
Solution
Discussion
See Also
9.2 Reacting to Objects in Video with TensorFlow Lite
Problem
Solution
Discussion
See Also
9.3 Identifying Sounds with TensorFlow Lite
Problem
Solution
Discussion
See Also
9.4 Reacting to a Whistle with TensorFlow Lite
Problem
Solution
Discussion
See Also
9.5 Installing Edge Impulse
Problem
Solution
Discussion
See Also
9.6 Recognizing a Spoken Command (in the Cloud)
Problem
Solution
Discussion
See Also
9.7 Recognizing a Spoken Command (Locally)
Problem
Solution
Discussion
See Also
9.8 Responding to a Spoken Command in Python
Problem
Solution
Discussion
See Also
Chapter 10. Hardware Basics
10.0 Introduction
10.1 Finding Your Way Around the GPIO Connector
Problem
Solution
Discussion
See Also
10.2 Using the GPIO Connector on a Raspberry Pi 400
Problem
Solution
Discussion
See Also
10.3 Keeping Your Raspberry Pi Safe When Using the GPIO Connector
Problem
Solution
Discussion
See Also
10.4 Setting Up I2C
Problem
Solution
Discussion
See Also
10.5 Using I2C Tools
Problem
Solution
Discussion
See Also
10.6 Setting Up SPI
Problem
Solution
Discussion
See Also
10.7 Installing pySerial for Access to the Serial Port from Python
Problem
Solution
Discussion
See Also
10.8 Installing Minicom to Test the Serial Port
Problem
Solution
Discussion
See Also
10.9 Using a Breadboard with Jumper Leads
Problem
Solution
Discussion
See Also
10.10 Using a Raspberry Squid
Problem
Solution
Discussion
See Also
10.11 Using a Raspberry Squid Button
Problem
Solution
Discussion
See Also
10.12 Converting 5V Signals to 3.3V with Two Resistors
Problem
Solution
Discussion
See Also
10.13 Converting 5V Signals to 3.3V with a Level Converter Module
Problem
Solution
Discussion
See Also
10.14 Powering a Raspberry Pi with a LiPo Battery
Problem
Solution
Discussion
See Also
10.15 Getting Started with the Sense HAT
Problem
Solution
Discussion
See Also
10.16 Getting Started with the Explorer HAT Pro
Problem
Solution
Discussion
See Also
10.17 Making a HAT
Problem
Solution
Discussion
See Also
10.18 Using the Raspberry Pi Zero 2 and Pi Zero 2 W
Problem
Solution
Discussion
See Also
Chapter 11. Controlling Hardware
11.0 Introduction
11.1 Connecting an LED
Problem
Solution
Discussion
See Also
11.2 Leaving the GPIO Pins in a Safe State
Problem
Solution
Discussion
See Also
11.3 Controlling the Brightness of an LED
Problem
Solution
Discussion
See Also
11.4 Switching a High-Power DC Device Using a Transistor
Problem
Solution
Discussion
See Also
11.5 Switching a High-Power Device Using a Relay
Problem
Solution
Discussion
See Also
11.6 Switching Using a Solid-State Relay
Problem
Solution
Discussion
See Also
11.7 Controlling High-Voltage AC Devices
Problem
Solution
Discussion
See Also
11.8 Controlling Hardware with Android and Bluetooth
Problem
Solution
Discussion
See Also
11.9 Making a User Interface to Turn Things On and Off
Problem
Solution
Discussion
See Also
11.10 Making a User Interface to Control PWM Power for LEDs and Motors
Problem
Solution
Discussion
See Also
11.11 Making a User Interface to Change the Color of an RGB LED
Problem
Solution
Discussion
See Also
11.12 Using an Analog Meter as a Display
Problem
Solution
Discussion
See Also
Chapter 12. Motors
12.0 Introduction
12.1 Controlling Servomotors
Problem
Solution
Discussion
See Also
12.2 Controlling Servomotors Precisely
Problem
Solution
Discussion
See Also
12.3 Controlling Multiple Servomotors Precisely
Problem
Solution
Discussion
See Also
12.4 Controlling the Speed of a DC Motor
Problem
Solution
Discussion
See Also
12.5 Controlling the Direction of a DC Motor
Problem
Solution
Discussion
See Also
12.6 Using a Unipolar Stepper Motor
Problem
Solution
Discussion
See Also
12.7 Using a Bipolar Stepper Motor
Problem
Solution
Discussion
See Also
12.8 Using a Stepper Motor HAT to Drive a Bipolar Stepper Motor
Problem
Solution
Discussion
See Also
Chapter 13. Digital Inputs
13.0 Introduction
13.1 Connecting a Push Switch
Problem
Solution
Discussion
See Also
13.2 Toggling with a Push Switch
Problem
Solution
Discussion
See Also
13.3 Using a Two-Position Toggle or Slide Switch
Problem
Solution
Discussion
See Also
13.4 Using a Center-Off Toggle or Slide Switch
Problem
Solution
Discussion
See Also
13.5 Debouncing a Button Press
Problem
Solution
Discussion
See Also
13.6 Using an External Pull-Up Resistor
Problem
Solution
Discussion
See Also
13.7 Using a Rotary (Quadrature) Encoder
Problem
Solution
Discussion
See Also
13.8 Using a Keypad
Problem
Solution
Discussion
See Also
13.9 Detecting Movement
Problem
Solution
Discussion
See Also
13.10 Adding GPS to the Raspberry Pi
Problem
Solution
Discussion
See Also
13.11 Intercepting Keypresses
Problem
Solution
Discussion
See Also
13.12 Intercepting Mouse Movements
Problem
Solution
Discussion
See Also
13.13 Giving the Raspberry Pi a Reset Button
Problem
Solution
Discussion
See Also
Chapter 14. Sensors
14.0 Introduction
14.1 Using Resistive Sensors
Problem
Solution
Discussion
See Also
14.2 Measuring Light
Problem
Solution
Discussion
See Also
14.3 Measuring Temperature with a Thermistor
Problem
Solution
Discussion
See Also
14.4 Detecting Methane
Problem
Solution
Discussion
See Also
14.5 Measuring Air Quality (CO2)
Problem
Solution
Discussion
See Also
14.6 Measuring Soil Moisture
Problem
Solution
Discussion
See Also
14.7 Measuring a Voltage
Problem
Solution
Discussion
See Also
14.8 Reducing Voltages for Measurement
Problem
Solution
Discussion
See Also
14.9 Using Resistive Sensors with an ADC
Problem
Solution
Discussion
See Also
14.10 Measuring Temperature with an ADC
Problem
Solution
Discussion
See Also
14.11 Measuring the Raspberry Pi CPU Temperature
Problem
Solution
Discussion
See Also
14.12 Measuring Temperature, Humidity, and Pressure with a Sense HAT
Problem
Solution
Discussion
See Also
14.13 Measuring Temperature Using a Digital Sensor
Problem
Solution
Discussion
See Also
14.14 Measuring Acceleration with an MMA8452Q Module
Problem
Solution
Discussion
See Also
14.15 Finding Magnetic North with the Sense HAT
Problem
Solution
Discussion
See Also
14.16 Using the Inertial Measurement Unit of the Sense HAT
Problem
Solution
Discussion
See Also
14.17 Sensing a Magnet with a Reed Switch
Problem
Solution
Discussion
See Also
14.18 Sensing a Magnet with the Sense HAT
Problem
Solution
Discussion
See Also
14.19 Measuring Distance Using Ultrasound
Problem
Solution
Discussion
See Also
14.20 Measuring Distance Using a Time-of-Flight Sensor
Problem
Solution
Discussion
See Also
14.21 Adding Touch Sensing to Your Raspberry Pi
Problem
Solution
Discussion
See Also
14.22 Reading Smart Cards with an RFID Reader/Writer
Problem
Solution
Discussion
See Also
14.23 Displaying Sensor Values
Problem
Solution
Discussion
See Also
14.24 Logging to a USB Flash Drive
Problem
Solution
Discussion
See Also
Chapter 15. Displays
15.0 Introduction
15.1 Using a Four-Digit LED Display
Problem
Solution
Discussion
See Also
15.2 Displaying Graphics on an I2C LED Matrix
Problem
Solution
Discussion
See Also
15.3 Using the Sense HAT LED Matrix Display
Problem
Solution
Discussion
See Also
15.4 Using an OLED Graphical Display
Problem
Solution
Discussion
See Also
15.5 Using Addressable RGB LED Strips
Problem
Solution
Discussion
See Also
15.6 Using the Pimoroni Unicorn HAT
Problem
Solution
Discussion
See Also
15.7 Using an ePaper Display
Problem
Solution
Discussion
See Also
Chapter 16. Sound
16.0 Introduction
16.1 Connecting a Loudspeaker
Problem
Solution
Discussion
See Also
16.2 Controlling Where Sound Is Output
Problem
Solution
Discussion
See Also
16.3 Playing Audio on a Raspberry Pi Without an Audio Socket
Problem
Solution
Discussion
See Also
16.4 Playing Sound from the Command Line
Problem
Solution
Discussion
See Also
16.5 Playing Sound from Python
Problem
Solution
Discussion
See Also
16.6 Using a USB Microphone
Problem
Solution
Discussion
See Also
16.7 Making a Buzzing Sound
Problem
Solution
Discussion
See Also
Chapter 17. The Internet of Things
17.0 Introduction
17.1 Controlling GPIO Outputs Using a Web Interface
Problem
Solution
Discussion
See Also
17.2 Displaying Sensor Readings on a Web Page
Problem
Solution
Discussion
See Also
17.3 Getting Started with Node-RED
Problem
Solution
Discussion
See Also
17.4 Sending Email and Other Notifications with IFTTT
Problem
Solution
Discussion
See Also
17.5 Sending Tweets Using ThingSpeak
Problem
Solution
Discussion
See Also
17.6 Changing LED Color Using CheerLights
Problem
Solution
Discussion
See Also
17.7 Sending Sensor Data to ThingSpeak
Problem
Solution
Discussion
See Also
17.8 Responding to Tweets Using Dweet and IFTTT
Problem
Solution
Discussion
See Also
Chapter 18. Home Automation
18.0 Introduction
18.1 Making a Raspberry Pi into a Message Broker with Mosquitto
Problem
Solution
Discussion
See Also
18.2 Using Node-RED with an MQTT Server
Problem
Solution
Discussion
See Also
18.3 Flashing a Sonoff WiFi Smart Switch for MQTT Use
Problem
Solution
Discussion
See Also
18.4 Configuring a Sonoff WiFi Smart Switch
Problem
Solution
Discussion
See Also
18.5 Using Sonoff Web Switches with MQTT
Problem
Solution
Discussion
See Also
18.6 Using Flashed Sonoff Switches with Node-RED
Problem
Solution
Discussion
See Also
18.7 Turning Things On and Off Using the Node-RED Dashboard
Problem
Solution
Discussion
See Also
18.8 Scheduling Events with Node-RED
Problem
Solution
Discussion
See Also
18.9 Publishing MQTT Messages from a Wemos D1
Problem
Solution
Discussion
See Also
18.10 Using a Wemos D1 with Node-RED
Problem
Solution
Discussion
See Also
Chapter 19. Raspberry Pi Pico and Pico W
19.0 Introduction
19.1 Connecting a Pico or Pico W to a Computer
Problem
Solution
Discussion
See Also
19.2 Using the Python Shell on a Pico
Problem
Solution
Discussion
See Also
19.3 Using a Pico with a Breadboard
Problem
Solution
Discussion
See Also
19.4 Using Digital Outputs on a Pico
Problem
Solution
Discussion
See Also
19.5 Using Digital Inputs on a Pico
Problem
Solution
Discussion
See Also
19.6 Using Analog (PWM) Outputs on a Pico
Problem
Solution
Discussion
See Also
19.7 Using Analog Inputs on a Pico
Problem
Solution
Discussion
See Also
19.8 Controlling a Servomotor from a Pico
Problem
Solution
Discussion
See Also
19.9 Using the Pico and Pico W’s Filesystem
Problem
Solution
Discussion
See Also
19.10 Making Use of the Second Core
Problem
Solution
Discussion
See Also
19.11 Running a WiFi Web Server on the Pico W
Problem
Solution
Discussion
See Also
19.12 Using Pico-Compatible Boards
Problem
Solution
Discussion
See Also
19.13 Using the Pico on Batteries
Problem
Solution
Discussion
See Also
Appendix A. Parts and Suppliers
Parts
Prototyping Equipment and Kits
Resistors and Capacitors
Transistors and Diodes
Integrated Circuits
OptoElectronics
Modules
Miscellaneous
Appendix B. Raspberry Pi Pinouts
Raspberry Pi 400/4/3/2 Model B, B+, A+, Zero
Raspberry Pi Model B revision 2, A
Raspberry Pi Model B revision 1
Raspberry Pi Pico
Index
About the Author