<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, Build, and Master Over 50 Projects with MicroPython and the RP2040 Microprocessor
β Scribed by Dogan Ibrahim
- Publisher
- Elektor Publication
- Year
- 2021
- Tongue
- English
- Leaves
- 250
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
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 efficiently within real-time control and monitoring applications requiring speed. The βPicoβ as we call it, is 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 its large memory, the Pico has even more attractive features including a vast number of GPIO pins, and popular interface modules like ADC, SPI, IΒ²C, UART, and PWM. To cap it all, the chip offers fast and accurate timing modules, a hardware debug interface, and an internal temperature sensor.
The Raspberry Pi Pico is easily programmed using popular high-level languages such as MicroPython and or C/C++. This book is an introduction to using the Raspberry Pi Pico microcontroller in conjunction with the MicroPython programming language. The Thonny development environment (IDE) is used in all the projects described.
There are over 50 working and tested projects in the book, covering the following topics:Β
- Installing the MicroPython on Raspberry Pi Pico using a Raspberry Pi or a PC
- Timer interrupts and external interrupts
- Analogue-to-digital converter (ADC) projects
- Using the internal temperature sensor and external temperature sensor chips
- Datalogging projects
- PWM, UART, IΒ²C, and SPI projects
- Using Wi-Fi and apps to communicate with smartphones
- Using Bluetooth and apps to communicate with smartphones
- Digital-to-analogue converter (DAC) projects
All projects given in the book have been fully tested and are working. Only basic programming and electronics experience is required to follow the projects. Brief descriptions, block diagrams, detailed circuit diagrams, and full MicroPython program listings are given for all projects described. Readers can find the program listings on the Elektor web page created to support the book.
β¦ Table of Contents
Preface
Chapter 1 β’ Raspberry Pi Pico Hardware
1.1 Overview
1.2 Pico hardware module
1.3 Comparison with the Arduino UNO
1.4 Operating conditions and powering the Pico
1.5 Pinout of the RP2040 microcontroller and Pico module
1.6 Other RP2040 microcontroller-based boards
1.6.1 Adafruit Feather RP2040
1.6.2 Adafruit ItsyBitsy RP2040
1.6.3 Pimoroni PicoSystem
1.6.4 Arduino Nano RP2040 Connect
1.6.5 SparkFun Thing Plus RP2040
1.6.6 Pimoroni Pico Explorer Base
1.6.7 SparkFun MicroMod RP2040 Processor
1.6.8 SparkFun Pro Micro RP2040
1.6.9 Pico RGB Keypad Base
1.6.10 Pico Omnibus
1.6.11 Pimoroni Pico VGA Demo Base
Chapter 2 β’ Raspberry Pi Pico Programming
2.1 Overview
2.2 Installing MicroPython on the Pico
2.2.1 Using a Raspberry Pi 4 to aid installing MicroPython on the Pico
2.2.2 Using a PC (Windows 10) to help install MicroPython on Pico
Chapter 3 β’ Raspberry Pi Pico Simple Hardware Projects
3.1 Overview
3.2 Project 1: Flashing LED β Using the on-board LED
3.3 Project 2: External flashing LED
3.4 Project 3: Flashing SOS in Morse
3.5 Project 4: Flashing LED β using a timer
3.6 Project 5: Alternately flashing LEDs
3.7 Project 6: Changing the LED flashing rate β using pushbutton interrupts
3.8 Project 7: Alternately flashing red, green, and blue LEDs β RGB
3.9 Project 8: Randomly flashing red, green, and blue LEDs β RGB
3.10 Project 9: Rotating LEDs
3.11 Project 10: Binary-counting LEDs
3.12 Project 11: Christmas lights (random flashing 8 LEDs)
3.13 Project 12: Electronic dice
3.14 Project 13: Lucky day of the week
3.15 Project 14: Door alarm with 7-colour flashing LED
3.16 Project 15: 2-digit, 7-segment display
3.17 Project 16: 4-digit, 7-segment display seconds counter
3.18 LCDs
3.19 Project 17: LCD functions β displaying text
3.20 Project 18: Seconds counter β LCD
3.21 Project 19: Reaction timer with LCD
3.22 Project 20: Ultrasonic distance measurement
3.23 Project 21: Height of a person (stadiometer)
3.24 Project 22: Ultrasonic reverse parking aid with buzzer
Chapter 4 β’ Using Analogue-To-Digital Converters (ADCs)
4.1 Overview
4.2 Project 1: Voltmeter
4.3 Project 2: Temperature measurement β using the internal temperature sensor
4.4 Project 3: Temperature measurement β using an external temperature sensor
4.5 Project 4: ON/OFF temperature controller
4.6 Project 5: ON/OFF temperature controller with LCD
4.7 Project 6: Measuring the ambient light intensity
4.8 Project 7: Ohmmeter
4.9 Project 8: Internal and external temperature
4.10 Project 9: Using a thermistor to measure temperature
CHAPTER 5 β’ Data Logging
5.1 Overview
5.2 Project 1: Logging the temperature data
5.3 Project 2: Reading the logged data
CHAPTER 6 β’ Pulse Width Modulation (PWM)
6.1 Overview
6.2 Basic theory of pulsewidth modulation
6.3 PWM channels of the Raspberry Pi Pico
6.4 Project 1: Generate a 1000Β Hz PWM waveform with 50% duty cycle
6.5 Project 2: Changing the brightness of an LED
6.6 Project 3: Varying the speed of a brushed DC motor
6.7 Project 4: Frequency generator with LCD
6.8 PROJECT 5: Measuring the frequency and duty cycle of a PWM waveform
6.9 PROJECT 6: Melody maker
CHAPTER 7 β’ Serial Communication (UART)
7.1 Overview
7.2 Raspberry Pi Pico UART serial ports
7.3 Project 1: Sending the Raspberry Pi Pico internal temperature to an Arduino Uno
7.4 Project 2: Receiving and displaying numbers from the Arduino Uno
7.5 Project 3: Communicating with the Raspberry Pi 4 over the serial link
CHAPTER 8 β’ The I2C Bus Interface
8.1 Overview
8.2 The I2C Bus
8.3 I2C pins of the Raspberry Pi Pico
8.4 Project 1: I2C port expander
8.5 Project 2: EEPROM memory
8.6 Project 3: TMP102 temperature sensor
8.7 Project 4: BMP280 temperature and atmospheric pressure sensor
8.8 Project 5: Display BMP280 temperature and atmospheric pressure on an LCD
Chapter 9 β’ The SPI Bus Interface
9.1 Overview
9.2 Raspberry Pi Pico SPI ports
9.3 Project 1: SPI Port expander
Chapter 10 β’ Wi-Fi with the Raspberry Pi Pico
10.1 Overview
10.2 Project 1: Controlling an LED from a smartphone using Wi-Fi
10.3 Project 2: Displaying the internal temperature on a smartphone using Wi-Fi
Chapter 11 β’ Bluetooth with the Raspberry Pi Pico
11.1 Overview
11.2 Raspberry Pi Pico Bluetooth interface
11.3 Project 1: Controlling an LED from your smartphone using Bluetooth
11.4 Project 2: Sending the Raspberry Pi Pico's internal temperature to the smartphone
Chapter 12 β’ Using Digital-to-Analogue Converters (DACs)
12.1 Overview
12.2 The MCP4921 DAC
12.3 Project 1: Generating squarewave signal with amplitude under +3.3Β V
12.4 Project 2: Generating fixed voltages
12.5 Project 3: Generating a sawtooth signal
12.6 Project 4: Generating a triangular signal
12.7 Project 5: Arbitrary periodic waveform
12.8 Project 6: Generating a sinewave
12.9 Project 7: Generating an accurate sinewave signal using timer interrupts
Chapter 13 β’ Automatic Program Execution after the Raspberry Pi Pico Boots
Appendix A β’ Bill of Components
Index
cover UK.pdf
_GoBack
Preface
Chapter 1 β’ Raspberry Pi Pico Hardware
1.1 Overview
1.2 Pico hardware module
1.3 Comparison with the Arduino UNO
1.4 Operating conditions and powering the Pico
1.5 Pinout of the RP2040 microcontroller and Pico module
1.6 Other RP2040 microcontroller-based boards
1.6.1 Adafruit Feather RP2040
1.6.2 Adafruit ItsyBitsy RP2040
1.6.3 Pimoroni PicoSystem
1.6.4 Arduino Nano RP2040 Connect
1.6.5 SparkFun Thing Plus RP2040
1.6.6 Pimoroni Pico Explorer Base
1.6.7 SparkFun MicroMod RP2040 Processor
1.6.8 SparkFun Pro Micro RP2040
1.6.9 Pico RGB Keypad Base
1.6.10 Pico Omnibus
1.6.11 Pimoroni Pico VGA Demo Base
Chapter 2 β’ Raspberry Pi Pico Programming
2.1 Overview
2.2 Installing MicroPython on the Pico
2.2.1 Using a Raspberry Pi 4 to aid installing MicroPython on the Pico
2.2.2 Using a PC (Windows 10) to help install MicroPython on Pico
Chapter 3 β’ Raspberry Pi Pico Simple Hardware Projects
3.1 Overview
3.2 Project 1: Flashing LED β Using the on-board LED
3.3 Project 2: External flashing LED
3.4 Project 3: Flashing SOS in Morse
3.5 Project 4: Flashing LED β using a timer
3.6 Project 5: Alternately flashing LEDs
3.7 Project 6: Changing the LED flashing rate β using pushbutton interrupts
3.8 Project 7: Alternately flashing red, green, and blue LEDs β RGB
3.9 Project 8: Randomly flashing red, green, and blue LEDs β RGB
3.10 Project 9: Rotating LEDs
3.11 Project 10: Binary-counting LEDs
3.12 Project 11: Christmas lights (random flashing 8 LEDs)
3.13 Project 12: Electronic dice
3.14 Project 13: Lucky day of the week
3.15 Project 14: Door alarm with 7-colour flashing LED
3.16 Project 15: 2-digit, 7-segment display
3.17 Project 16: 4-digit, 7-segment display seconds counter
3.18 LCDs
3.19 Project 17: LCD functions β displaying text
3.20 Project 18: Seconds counter β LCD
3.21 Project 19: Reaction timer with LCD
3.22 Project 20: Ultrasonic distance measurement
3.23 Project 21: Height of a person (stadiometer)
3.24 Project 22: Ultrasonic reverse parking aid with buzzer
Chapter 4 β’ Using Analogue-To-Digital Converters (ADCs)
4.1 Overview
4.2 Project 1: Voltmeter
4.3 Project 2: Temperature measurement β using the internal temperature sensor
4.4 Project 3: Temperature measurement β using an external temperature sensor
4.5 Project 4: ON/OFF temperature controller
4.6 Project 5: ON/OFF temperature controller with LCD
4.7 Project 6: Measuring the ambient light intensity
4.8 Project 7: Ohmmeter
4.9 Project 8: Internal and external temperature
4.10 Project 9: Using a thermistor to measure temperature
CHAPTER 5 β’ Data Logging
5.1 Overview
5.2 Project 1: Logging the temperature data
5.3 Project 2: Reading the logged data
CHAPTER 6 β’ Pulse Width Modulation (PWM)
6.1 Overview
6.2 Basic theory of pulsewidth modulation
6.3 PWM channels of the Raspberry Pi Pico
6.4 Project 1: Generate a 1000Β Hz PWM waveform with 50% duty cycle
6.5 Project 2: Changing the brightness of an LED
6.6 Project 3: Varying the speed of a brushed DC motor
6.7 Project 4: Frequency generator with LCD
6.8 PROJECT 5: Measuring the frequency and duty cycle of a PWM waveform
6.9 PROJECT 6: Melody maker
CHAPTER 7 β’ Serial Communication (UART)
7.1 Overview
7.2 Raspberry Pi Pico UART serial ports
7.3 Project 1: Sending the Raspberry Pi Pico internal temperature to an Arduino Uno
7.4 Project 2: Receiving and displaying numbers from the Arduino Uno
7.5 Project 3: Communicating with the Raspberry Pi 4 over the serial link
CHAPTER 8 β’ The I2C Bus Interface
8.1 Overview
8.2 The I2C Bus
8.3 I2C pins of the Raspberry Pi Pico
8.4 Project 1: I2C port expander
8.5 Project 2: EEPROM memory
8.6 Project 3: TMP102 temperature sensor
8.7 Project 4: BMP280 temperature and atmospheric pressure sensor
8.8 Project 5: Display BMP280 temperature and atmospheric pressure on an LCD
Chapter 9 β’ The SPI Bus Interface
9.1 Overview
9.2 Raspberry Pi Pico SPI ports
9.3 Project 1: SPI Port expander
Chapter 10 β’ Wi-Fi with the Raspberry Pi Pico
10.1 Overview
10.2 Project 1: Controlling an LED from a smartphone using Wi-Fi
10.3 Project 2: Displaying the internal temperature on a smartphone using Wi-Fi
Chapter 11 β’ Bluetooth with the Raspberry Pi Pico
11.1 Overview
11.2 Raspberry Pi Pico Bluetooth interface
11.3 Project 1: Controlling an LED from your smartphone using Bluetooth
11.4 Project 2: Sending the Raspberry Pi Pico's internal temperature to the smartphone
Chapter 12 β’ Using Digital-to-Analogue Converters (DACs)
12.1 Overview
12.2 The MCP4921 DAC
12.3 Project 1: Generating squarewave signal with amplitude under +3.3Β V
12.4 Project 2: Generating fixed voltages
12.5 Project 3: Generating a sawtooth signal
12.6 Project 4: Generating a triangular signal
12.7 Project 5: Arbitrary periodic waveform
12.8 Project 6: Generating a sinewave
12.9 Project 7: Generating an accurate sinewave signal using timer interrupts
Chapter 13 β’ Automatic Program Execution after the Raspberry Pi Pico Boots
Appendix A β’ Bill of Components
Index
π SIMILAR VOLUMES
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
<div> <p>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
<span>Program the Raspberry Pi Pico, the latest microcontroller board from raspberrypi.org, with MicroPython. This book will take you on a tour of the Raspberry Pi Pico, including how to get started using the microcontroller, seeing which alternative microcontrollers are available, and how to connec
<span>Program the Raspberry Pi Pico, the latest microcontroller board from raspberrypi.org, with MicroPython. This book will take you on a tour of the Raspberry Pi Pico, including how to get started using the microcontroller, seeing which alternative microcontrollers are available, and how to connec
<span>Program the Raspberry Pi Pico, the latest microcontroller board from raspberrypi.org, with MicroPython. This book will take you on a tour of the Raspberry Pi Pico, including how to get started using the microcontroller, seeing which alternative microcontrollers are available, and how to connec