Raspberry Pi Pico Tips and Tricks

Raspberry Pi Pico Tips and Tricks

Malcolm Maclean
Buy on Leanpub

Table of Contents

Raspberry Pi Pico Tips and Tricks

  • Introduction
    • Welcome!
    • What are we trying to do?
    • Who is this book for?
    • What will we need?
    • Why on earth did I write this rambling tome?
    • Where can you get more information?
  • Microcontrollers vs Computers
    • Microcontrollers
    • Computers
    • What’s the difference to you?
  • The Raspberry Pi Pico
    • The RP2040 Microcontroller Chip
    • The Raspberry Pi Pico W Microcontroller Board
  • Set up
    • Hardware
    • Software
    • What is Thonny?
    • Install Thonny
  • MicroPython
    • What is MicroPython?
    • Connect our Pico
    • Automatically Installing the Firmware
    • Manually Installing the Firmware
    • Updating Firmware
    • Use the Shell
    • Blink the on-board LED
    • Automatically run your program
  • Connectivity
    • Connecting using Dupont Connectors
    • Connectivity via WiFi
    • General Purpose Input / Output (GPIO)
    • Inter-Integrated Circuit (I2C)
    • Serial Peripheral Interface (SPI)
  • Reed Switches with the Raspberry Pi Pico
    • What is a Reed Switch?
    • The Magnetic Reed Switch
    • How do we read a switch?
    • Connecting up the switch to the Pico
    • Code
  • Controlling a Servo from the Raspberry Pi Pico
    • What is a Servo Motor?
    • How does a Servo Motor Work?
    • How is a Servo Motor Controlled?
    • Connecting Everything Up to the Pico
    • Code
    • Warning
  • Controlling a Motor with the Raspberry Pi Pico
    • What are the principles of motor control?
    • How will we implement it?
    • Connecting Up the motor controller and battery
    • Code
  • Using a Stepper Motor with a Raspberry Pi Pico
    • The Stepper Motor
    • The 28BYJ-48
    • Connecting the Pico to the controller to the GY-521
    • Code
  • Connecting an SD Card to the Raspberry Pi Pico
    • SD card adapter or adaptor.
    • My personal SD Card adapter journey
    • Choose your weapon
    • Install the SDCard Library.
    • Connect the SD Card Adapter
    • Code
    • Bonus Connection!
  • Connecting MQ Series Gas Detectors to the Pico
    • The Sensor
    • Connect Everything Up
    • Code
  • Distance Measurement using Time of Flight Sensor
    • What is a Time Of Flight Sensor?
    • How does a Time Of Flight Sensor Work?
    • How is a Time Of Flight Sensor Controlled?
    • Connecting a Time Of Flight Sensor Up to the Pico
    • Code
  • Distance Measurement using an Ultrasonic Sensor
    • What is an Ultrasonic Sensor?
    • How does an Ultrasonic Sensor Work?
    • Connecting an Ultrasonic Sensor Up to the Pico
    • Code
  • Motion detection using a Microwave Doppler Sensor
    • What is a Doppler Sensor?
    • How does a Microwave Doppler Sensor Work?
    • Connecting the RWCL-0516 Sensor Up to the Pico
    • Code
  • Reading the on-board Temperature of a Raspberry Pi Pico
    • About the sensor
    • Code
  • Multiple Temperature Measurements
    • The DS18B20 Sensor
    • Hardware required
    • Connecting everything up
    • Code
  • AHT10 Temperature and Relative Humidity
    • AHT10 Details
    • How is the AHT10 sensor accessed?
    • Connecting the AHT10 to the Pico
    • Code
  • Motion Sensing with the Raspberry Pi Pico
    • What is a PIR Sensor?
    • How does a PIR Sensor Work?
    • How do we read a PIR?
    • Connecting Up a PIR to the Pico
    • Code
  • Sensing vibration with a Raspberry Pi Pico
    • Vibration sensors
    • Piezoelectric vibration sensor
    • Connecting everything up
    • Code
  • Using an Inertial Measurement Unit (IMU) with a Pico
    • The IMU
    • The GY-521 IMU module using a MPU-6050
    • Connecting the GY-521 to the Raspberry Pi Pico
    • Code
  • Using an OLED Display attached to a Pico
    • The OLED Display
    • Connecting the Display to the Pico
    • Loading the ssd1306 PyPI module
    • Code
  • Using a Dot-Matrix Display Attached to a Pico
    • The Dot-Matrix Display
    • How is the display accessed?
    • Connecting the Display to the Pico
    • Code
  • Controlling addressable LEDs
    • What are addressable LEDs?
    • Connecting the addressable LEDs
    • How do we talk to our addressable LEDs?
    • Code
  • Using the Raspberry Pi Pico as a Prometheus Node
    • About Prometheus and Grafana
    • Using the Pico as an Exporter
    • Code
  • Sending an email from a Raspberry Pi Pico W
    • The slightly tricky part of email.
    • The Code
  • Integrating a Real Time Clock (RTC) with a Raspberry Pi Pico
    • Just what is a RTC?
    • The RTC on a Raspberry Pi Pico
    • The Code
    • What gives? My Pico appears to have accurate time already!
  • General Pico Tips and Tricks
    • Universal LED Blink
    • The Watchdog Timer
    • Logging to Help with Troubleshooting
Raspberry Pi Pico Tips and Tricks/overview

Raspberry Pi Pico Tips and Tricks

course_overview

All the tips and tricks that will help you advance your microcontroller skills, demonstrated using a Raspberry Pi Pico.

count_chapters
begin_reading
download
p_implied_book_part_name

Raspberry Pi Pico Tips and Tricks28 chapters

Begin ›
  1. Introduction

  2. Microcontrollers vs Computers

  3. The Raspberry Pi Pico

  4. Set up

  5. MicroPython

  6. Connectivity

  7. Reed Switches with the Raspberry Pi Pico

  8. Controlling a Servo from the Raspberry Pi Pico

  9. Controlling a Motor with the Raspberry Pi Pico

  10. Using a Stepper Motor with a Raspberry Pi Pico

  11. Connecting an SD Card to the Raspberry Pi Pico

  12. Connecting MQ Series Gas Detectors to the Pico

  13. Distance Measurement using Time of Flight Sensor

  14. Distance Measurement using an Ultrasonic Sensor

  15. Motion detection using a Microwave Doppler Sensor

  16. Reading the on-board Temperature of a Raspberry Pi Pico

  17. Multiple Temperature Measurements

  18. AHT10 Temperature and Relative Humidity

  19. Motion Sensing with the Raspberry Pi Pico

  20. Sensing vibration with a Raspberry Pi Pico

  21. Using an Inertial Measurement Unit (IMU) with a Pico

  22. Using an OLED Display attached to a Pico

  23. Using a Dot-Matrix Display Attached to a Pico

  24. Controlling addressable LEDs

  25. Using the Raspberry Pi Pico as a Prometheus Node

  26. Sending an email from a Raspberry Pi Pico W

  27. Integrating a Real Time Clock (RTC) with a Raspberry Pi Pico

  28. General Pico Tips and Tricks