Raspberry Pi Pico Experimentierkit: Programming & Projects

A Quick Guide to the RP2040 Microcontroller

Image shows the Raspberry Pi Pico microcontroller board surrounded by various electronic components including sensors, LEDs, a servo motor, and jumper wires, laid out on a green grid background.

Copyright and Disclaimer

Copyright © 2022 Elektor Verlag GmbH, Aachen. 1st Edition 2022. All rights reserved.

The contributions published in this book, especially all essays and articles as well as all drafts, plans, drawings, and illustrations, are protected by copyright. Their reproduction and distribution, even in part, is generally only permitted with prior written consent from the publisher.

The information in this book is published without regard to any potential patent protection. Software and hardware designations mentioned in this book may be registered trademarks even if not explicitly indicated. They belong to the respective trademark holders and are subject to legal provisions.

The greatest care has been taken in compiling the texts and illustrations. Nevertheless, errors cannot be completely excluded. The publisher, editor, and author can assume neither legal responsibility nor any liability for incorrect information and its consequences.

The publisher and author are grateful for any notification of errors.

Explanation

The author, translator, and editor have made every effort to ensure the accuracy of the information contained in this book. They assume no liability for losses or damages caused by errors or omissions in this book, regardless of whether these errors or omissions are due to negligence, oversight, or any other cause, and hereby disclaim any liability to third parties.

All programs contained in this book are subject to the copyright of the author and Elektor Verlag. These programs may only be used for educational purposes. The use of the programs for commercial purposes requires written permission from the author or Elektor.

Cover design: Elektor, Aachen

Translation: Andreas Reidenauer

Layout and typesetting: D-Vision, Julian van den Berg | Oss (NL)

Printing: Ipskamp Printing, Enschede, Netherlands

ISBN: 978-3-89576-511-7 (Print), 978-3-89576-512-4 (eBook)

Elektor-Verlag GmbH, Aachen. www.elektor.de

Elektor is part of the Elektor International Media (EIM) group, the world's most important source for technical information and electronics products for engineers and electronics developers, and for companies that employ these professionals. Elektor's international team develops high-quality content daily for developers and DIY electronics enthusiasts, distributed through various media (magazines, videos, digital media, and social media) in numerous languages. www.elektor.de

Contents

Foreword

Chapter 1: Raspberry Pi Pico Hardware

  • 1.1 Overview
  • 1.2 Pico Hardware Module
  • 1.3 Comparison with Arduino UNO
  • 1.4 Operating Conditions and Power Supply of the Pico
  • 1.5 Pin Assignment of the RP2040 Microcontroller and the Pico Module
  • 1.6 Raspberry Pi Pico Experimentierkit
  • 1.6.1 Block Diagram of the Development Board

Chapter 2: Raspberry Pi Pico Programming Environment

  • 2.1 Overview
  • 2.2 Installing MicroPython on the Raspberry Pi Pico
  • 2.2.1 Installing MicroPython on the Pico with a PC (Windows 10)
  • 2.3 Using the Thonny Development Environment on the PC

Chapter 3: Simple Programs – Software Only

  • 3.1 Overview
  • 3.2 Example Programs
  • 3.3 Summary

Chapter 4: Projects with Board Hardware

  • 4.1 Overview
  • 4.2 Project 1 – Blinking On-Board LED
  • 4.3 Project 2 – SOS Blinking
  • 4.4 Project 3 – Blinking LED – Using a Timer
  • 4.5 Project 4 – Alternating Blinking LEDs
  • 4.6 Project 5 – Controlling an LED via Button
  • 4.7 Project 6 – Changing LED Blink Frequency Using Button Interrupts
  • 4.8 Project 7 – Binary Counter with LEDs
  • 4.9 Project 8 – Randomly Blinking Yellow, Green, and Blue LEDs
  • 4.10 Project 9 – LED Chaser Light
  • 4.11 Project 10 – Reaction Timer
  • 4.12 Project 11 – Buttons and LEDs
  • 4.13 Summary

Chapter 5: The TFT Display

  • 5.1 Overview
  • 5.2 The On-Board TFT Display
  • 5.2.1 Drawing Shapes
  • 5.2.2 Displaying Text
  • 5.2.3 Further TFT Functions
  • 5.3 Project 1 – Second Counter
  • 5.4 Project 2 – Event Counter
  • 5.5 Project 3 – Reaction Timer
  • 5.6 Project 4 – Displaying LED and Button Status
  • 5.7 Project 5 – Temperature and Humidity – Display in Thonny Window
  • 5.8 Project 6 – Temperature and Humidity – LED Output
  • 5.9 Project 7 – Temperature and Humidity – Display on TFT
  • 5.10 Project 8 – ON/OFF Temperature Control
  • 5.11 Project 9 – ON/OFF Temperature Control – Setting the Target Temperature
  • 5.12 Analog-to-Digital Converter
  • 5.12.1 Project 10 – Voltmeter
  • 5.13 Pulse Width Modulation
  • 5.13.1 Raspberry Pi Pico PWM Channels
  • 5.13.2 Project 11 – Changing LED Brightness
  • 5.14 Project 12 – Ultrasonic Distance Measurement – Display in Thonny Window
  • 5.15 Project 13 – Ultrasonic Distance Measurement – Display on TFT
  • 5.16 Project 14 – Person Size (Stadiometer)
  • 5.17 Project 15 – Ultrasonic Reverse Parking Aid with Buzzer
  • 5.18 Project 16 – Ultrasonic Level Control
  • 5.19 Project 17 – Playing a Melody
  • 5.20 Project 18 – Controlling a Servo Motor
  • 5.21 Project 19 – Precise Servo Motor Control
  • 5.22 Project 20 – WS2812 LED Strip Light Show – State Machine Approach
  • 5.23 Project 21 – WS2812 LED Strip Light Show with the Neopixel Library
  • 5.24 Project 22 – WS2812 LED Show – Another Example for the Neopixel Library
  • 5.25 The MPU6050 IMU Module
  • 5.26 Project 23 – Displaying the 3 Acceleration Dimensions
  • 5.27 Project 24 – Maximum Acceleration of a Car on the TFT Display
  • 5.28 Project 25 – Position Display with Gyroscope
  • 5.29 Project 26 – MPU6050 Temperature Display
  • 5.30 Project 27 – TFT Display Test
  • 5.31 Project 28 – TFT Bitmap Display

Chapter 6: Connection via WLAN (Wi-Fi)

  • 6.1 Overview
  • 6.2 WLAN Connection with the Pico Kit
  • 6.2.1 The ESP 12S Processor
  • 6.2.2 Programming AT Commands
  • 6.2.3 Project 1 – Connecting to the Local Wi-Fi Network and Displaying the IP Address
  • 6.2.4 Establishing a TCP/UDP Connection
  • 6.2.5 Project 2 – Controlling an LED via Wi-Fi from a Smartphone
  • 6.2.6 Project 3 – Displaying Temperature on a Smartphone via Wi-Fi

Appendix A

  • Transferring Files Between Pico Board and PC

Appendix B

  • Projects and Features Used

Index

PDF preview unavailable. Download the PDF instead.

Inhalt Raspberry-Pi-Pico-Experimentierkit macOS Version 12.4 (Build 21F79) Quartz PDFContext

Related Documents

Preview Raspberry Pi Pico Experimenting Kit: Programming and Projects Guide
A comprehensive guide to the Raspberry Pi Pico Experimenting Kit, covering hardware, programming environments, and 42 diverse projects using MicroPython. Learn to master the RP2040 microcontroller with hands-on examples for electronics enthusiasts.
Preview Raspberry Pi Pico W: Program, Build, and Master 60+ Projects
A comprehensive guide to programming, building, and mastering over 60 projects using the Raspberry Pi Pico W and its RP2040 microcontroller. Covers hardware, programming with MicroPython, and various applications including LED projects, displays, sensors, PWM, Bluetooth, Wi-Fi, and RFID.
Preview Raspberry Pi Pico Essentials: Program, Build, and Master Over 50 Projects with MicroPython and RP2040
A comprehensive guide to the Raspberry Pi Pico microcontroller, covering hardware, programming with MicroPython, and over 50 practical projects including LEDs, sensors, communication interfaces, and more.
Preview Raspberry Pi Pico Kit for Advanced Users: Programming and Projects
A comprehensive project handbook for the Raspberry Pi Pico and RP2040 microcontroller, covering programming, electronics, and over 80 projects. Published by Elektor.
Preview Motor Control Development Kit RP2040: Programming and Projects Guide
An in-depth guide to the Elektor Motor Control Development Kit featuring the RP2040 microcontroller. Learn to program and build projects involving DC, AC, servo, and stepper motors.
Preview Raspberry Pi Pico Advanced Kit: Programming & Projects Guide
A comprehensive guide to programming and projects using the Raspberry Pi Pico and RP2040 microcontroller. This kit includes over 80 projects covering physical computing, sensors, displays, robotics, and Python programming.
Preview Raspberry Pi 4 and Pico Projects: Measuring, Controlling, Regulating
Explore practical projects for Raspberry Pi 4 and Raspberry Pi Pico, covering measurement, control, and regulation techniques with Python programming and hardware insights. This guide provides step-by-step instructions and project ideas for makers and electronics enthusiasts.
Preview Installing Raspberry Pi Pico on Arduino IDE: A Step-by-Step Guide
Learn how to set up the Arduino IDE to program the Raspberry Pi Pico microcontroller. This guide covers adding the necessary board manager URL and selecting the correct board for your projects.