Reader small image

You're reading from  Raspberry Pi Pico DIY Workshop

Product typeBook
Published inMay 2022
PublisherPackt
ISBN-139781801814812
Edition1st Edition
Right arrow
Authors (2):
Sai Yamanoor
Sai Yamanoor
author image
Sai Yamanoor

Sai Yamanoor is an embedded systems engineer working for a private startup school in the San Francisco Bay Area, where he builds devices that help students achieve their full potential. He completed his undergraduate work in mechatronics engineering from Sri Krishna College of Engineering and Technology, Coimbatore, India and his graduate studies in mechanical engineering at Carnegie Mellon University, Pittsburgh PA. His interests, deeply rooted in DIY and open software and hardware cultures, include developing gadgets and apps that improve the quality of life, Internet of Things, crowdfunding, education, and new technologies. In his spare time, he plays with various devices and architectures, such as the Raspberry Pi, Arduino, Galileo, Android devices and others. Sai has earlier published a book titled Raspberry Pi Mechatronics Projects.
Read more about Sai Yamanoor

Srihari Yamanoor
Srihari Yamanoor
author image
Srihari Yamanoor

Srihari Yamanoor is a mechanical engineer, working on medical devices, sustainability, and robotics in the San Francisco Bay Area. He completed his undergraduate studies in mechanical engineering from PSG College of Technology, Coimbatore, India and graduate studies in mechanical engineering at Stanford University. He is certified in SolidWorks, simulation, sustainable design, PDM as well as in quality and reliability engineering and auditing. His has a wide range of interests, from DIY, crowdfunding, AI, travelling, photography to gardening and ecology.
Read more about Srihari Yamanoor

View More author details
Right arrow

Preface

As soon as the announcement for the Raspberry Pi Pico was made by the Raspberry Pi Foundation in January 2021, we were excited by the new possibilities that the USD 4 developer board would open for hobbyists, generalists, citizen scientists, professionals, scientists, teachers, and students around the world. Available in various forms, the powerful yet inexpensive microcontroller can indeed stand on its own and work with other tools to help people develop very powerful and elegant solutions. We expect that just like the prior generations of products from the Raspberry Pi Foundation, the Raspberry Pi Pico is going to create another revolution in the realms of technology, education, entertainment, and other societal endeavors.

Based on our experience in penning books and articles on the Raspberry Pi Single-Board Computers (SBCs), we designed this book to dive into new and repeat projects so we may cater to the varying needs of the target audiences, such as students, teachers, engineers, scientists, artists, and tech enthusiasts who want to develop embedded systems that drive cost-effective automation, IoT, robotics, medical devices, and art projects.

We have tried to retain variety in the projects, while also introducing different sensors, programming, interfaces, and other factors sufficient to pave the way for both beginners and advanced readers to ideate and implement projects based on the Raspberry Pi Pico.

Who this book is for

As mentioned, we have developed the materials and projects to cater to a wide variety of readers. You may be a seasoned hobbyist or professional interested in how the Pico can help you with your projects. You may have a little or a lot of experience with electronics, SBCs, microcontrollers, or programming. You may have all the skillsets and be on the hunt for new projects, to entertain yourself or teach in your classroom. This book is aimed at people with a wide variety of backgrounds and experiences.

That said, some basic experience in programming, electronics, and related areas will be very useful in getting through the materials and projects in the book. If you wish to jumpstart your experience with Python programming, you can refer to our other publication, Python Programming with Raspberry Pi, also published by Packt.

What this book covers

Chapter 1, Getting Started with the Raspberry Pi Pico, lays out the fundamentals of the Raspberry Pi Pico, the various forms it comes in, the accessories, and how to program the Pico. We also show you how to complete a classic Hello World example and make an LED blink.

Chapter 2, Serial Interfaces and Applications, is the chapter where we explore how to use the serial interfaces of the Raspberry Pi Pico to communicate with sensors, displays, and other hardware. We also demonstrate how to interface a Wi-Fi module and connect the Raspberry Pi Pico to the internet.

Chapter 3, Home Automation Projects, continues with simple home automation projects that can be completed in a weekend, expanding on applications with serial interfaces. We also introduce and demonstrate the Arduino RP2040 Connect and how it can be used in place of a Pico.

Chapter 4, Fun with Gardening, allows us to dig deeper into project implementations with the Pico. We interface a soil sensor to a live plant, measure temperature and soil humidity, and upload the data to an IoT analytics platform and visualize the collected data.

Chapter 5, Building a Weather Station, is a special treat for weather geeks and citizen scientists. We will build a weather station, exploring different sensors and interface options with the Raspberry Pi Pico.

Chapter 6, Designing a Giant Seven-Segment Display, is all about creating great visual aids. We discuss driving the display via the serial port or from within a local network.

Chapter 7, Designing a Visual Aid for Tracking Air Quality, continuing from the previous chapter, is where we demonstrate a different visual aid application, this time taking two different approaches: one using existing data sources and the other using a carbon dioxide sensor to determine air quality.

Chapter 8, Building Wireless Nodes, is where we go beyond Wi-Fi and explore other ways of collecting and transmitting data wirelessly, using LoRa, Sigfox, and Bluetooth. This will allow you to freely develop wireless applications with the Pico.

Chapter 9, Let's Build a Robot!, is for the robotics enthusiasts. We demonstrate how a robot can be controlled with the Pico. In this chapter, we introduce MicroPython as well, for those who plan to keep the code light.

Chapter 10, Designing TinyML Applications, is a gateway for those of you looking to develop AI applications with the Pico. We introduce you to TinyML, a framework specifically focused on lightweight AI applications. We lead you through a keyword recognition example, which will help set the stage for you to take the examples further.

Chapter 11, Let's Build a Product!, takes you on a journey to turbocharge things further and build a product. We demonstrate a method to build a carrier PCB for the Pico, and also how to use a cellular module for connectivity.

Chapter 12, Best Practices for Working with the Pico, is where we close out the book, with tips and tricks that can take your projects with the Pico further. We discuss how the Pico firmware can be updated, how the Arduino IDE can be used to program the Pico, power profiling the Pico, and programming the PIOs.

We hope that the chapters and projects will prepare you for your future adventures with the Raspberry Pi Pico.

To get the most out of this book

The projects discussed in this chapter are hardware intensive. In order to maintain consistency, we used the Raspberry Pi Pico across all chapters. You will also need an ESP-32 wireless pack for network connectivity. Each chapter has a list of recommended hardware and we have listed alternatives wherever possible. We leave it up to you to substitute components as you see fit.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

If you find any specific hardware-related issues with the code samples shared in the repository, please feel free to create a GitHub issue.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Raspberry-Pi-Pico-DIY-Workshop. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Code in Action

The Code in Action videos for this book can be viewed at https://bit.ly/3OZJb5Z.

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801814812_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The board module contains definitions of the pins and peripherals specific to the board."

A block of code is set as follows:

from machine import Pin
import utime
led = Pin(25, Pin.OUT)
while True:

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

while True:
    led.toggle()
    utime.sleep(1)

Any command-line input or output is written as follows:

>>> print("Hello World")

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "An impulse can be created from the Create impulse tab on the left."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share your thoughts

Once you've read Raspberry Pi Pico DIY Workshop, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Raspberry Pi Pico DIY Workshop
Published in: May 2022Publisher: PacktISBN-13: 9781801814812
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Sai Yamanoor

Sai Yamanoor is an embedded systems engineer working for a private startup school in the San Francisco Bay Area, where he builds devices that help students achieve their full potential. He completed his undergraduate work in mechatronics engineering from Sri Krishna College of Engineering and Technology, Coimbatore, India and his graduate studies in mechanical engineering at Carnegie Mellon University, Pittsburgh PA. His interests, deeply rooted in DIY and open software and hardware cultures, include developing gadgets and apps that improve the quality of life, Internet of Things, crowdfunding, education, and new technologies. In his spare time, he plays with various devices and architectures, such as the Raspberry Pi, Arduino, Galileo, Android devices and others. Sai has earlier published a book titled Raspberry Pi Mechatronics Projects.
Read more about Sai Yamanoor

author image
Srihari Yamanoor

Srihari Yamanoor is a mechanical engineer, working on medical devices, sustainability, and robotics in the San Francisco Bay Area. He completed his undergraduate studies in mechanical engineering from PSG College of Technology, Coimbatore, India and graduate studies in mechanical engineering at Stanford University. He is certified in SolidWorks, simulation, sustainable design, PDM as well as in quality and reliability engineering and auditing. His has a wide range of interests, from DIY, crowdfunding, AI, travelling, photography to gardening and ecology.
Read more about Srihari Yamanoor