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

Chapter 12: Best Practices for Working with the Pico

In this final chapter, we will cover some topics that weren't necessarily covered in the projects we discussed in this book. We will also discuss topics that will help you execute your projects better.

In this chapter, we will cover the following topics:

  • Upgrading your Pico's firmware
  • Programming the Pico using the Arduino IDE
  • Programming in C/C++ using the Pico SDK
  • Tools to aid with prototyping and product development

Technical requirements

There aren't strict hardware or software requirements for this chapter. You will need a Raspberry Pi Pico to discuss these topics. You can buy one from https://www.adafruit.com/product/4883.

Code in Action videos for this chapter can be viewed at https://bit.ly/3kH2Cm7.

We will start by understanding how to upgrade your Pico's firmware.

Upgrading your Pico's firmware

From time to time, you will need to upgrade your Pico's firmware. In this section, we will discuss upgrading your Pico's firmware. Upgrading your Pico's firmware might be necessary if you wish to make use of the latest version of CircuitPython or MicroPython on your Pico, which either includes new features in the Pico or fixes bugs that have been identified in the previous versions. The following steps are necessary to upgrade the firmware on your Pico:

  1. We are going to assume that you are running either CircuitPython or MicroPython on your Pico. Let's discuss an example where we want to upgrade it to the latest version of CircuitPython. The first step is to download the latest version of the CircuitPython firmware that's available for the Raspberry Pi Pico from https://circuitpython.org/board/raspberry_pi_pico/.
  2. Currently, the Pico that needs to be updated is running CircuitPython version 6.3.0. This information...

Programming the Pico using the Arduino IDE

In the projects we've discussed in this book, we have been programming in CircuitPython or MicroPython. In this section, we will discuss programming the Pico using the Arduino platform. If you are not familiar with the Arduino platform, it is an open source electronics hardware and software that is meant to ease prototyping. It simplified prototyping through easy-to-use software and hardware that is available for a very low cost. It has enabled engineers, artists, and creators to rapidly build prototypes. There is a vast ecosystem of add-on hardware (known as shields) available for the Arduino platform. The Arduino platform enables the Pico to be programmed in C++. It also provides access to the vast ecosystem of libraries and add-on hardware that's available for the Arduino platform. You can learn more about the Arduino platform at https://www.arduino.cc/en/Guide/Introduction.

Downloading and installing the Arduino IDE

You...

Programming in C/C++ using the Pico SDK

In this section, we will discuss developing applications using the official software development kit (SDK) from the Raspberry Pi foundation. The SDK allows you to develop applications in C/C++ and the Raspberry Pi foundation has released detailed documentation on the API to help you develop applications using the Pico. The documentation is available at https://bit.ly/3IpBFwW.

The documentation includes information on installing the SDK, compiling your first example, and loading it onto your Pico. We recommend working through the documentation if you are interested in programming in C/C++.

C/C++ Code Samples

We have included C/C++ code samples for the Raspberry Pi Pico in this book's GitHub repository.

Debuggers for the Raspberry Pi Pico

If you are learning to program in C/C++, it is useful to have a debugging tool to troubleshoot your code. The Raspberry Pi Pico comes with a Serial Wire Debug (SWD) port that lets you troubleshoot...

Tools to aid with prototyping and product development

In this section, we will discuss tools that can aid prototyping and your general product development needs. We will start by discussing a breadboard from Simon Monk.

Breadboard with Pico's pinout labels

In Chapter 1, Getting Started with the Raspberry Pi Pico, we discussed the Pico's pinouts. It can be cumbersome to keep referring to the pinouts while you are trying to build your prototypes. We came across a breadboard from Simon Monk (MonkMakes) that carries the labels on the Pico's pinouts (as shown in the following figure). This allows you to wire up your connections easily during prototyping.

In the following figure, the blue letters refer to the GPIO pin numbers, while the ground pin is indicated with a G and the power pins are indicated in red letters. The labeling scheme assumes that the Pico is mounted onto the breadboard, as shown in the following figure:

Figure 12.16 –...

Summary

And that's a wrap!

We hope you enjoyed reading the various projects we discussed in this book. We culminated this chapter with various tips and tricks we gathered while we were working on the other chapters in this book. We will maintain this book's GitHub repository with the latest code samples and updates as necessary. We recommend submitting an issue in this book's GitHub repository if you come across any bugs while working on a project that was discussed in this book.

We, as makers and citizen scientists, are glad you joined us on this journey in developing applications with the Raspberry Pi Pico. The maker movement has sprouted and grown to be a strong force across the world, touching people of all ages, races, and backgrounds. The citizen science movement is no different, touching on some of the same key principles of collaboration and openness with an urge to solve important personal or societal problems cost-effectively.

We also hope that beyond...

Why subscribe?

  • Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
  • Improve your learning with Skill Plans built especially for you
  • Get a free eBook or video every month
  • Fully searchable for easy access to vital information
  • Copy and paste, print, and bookmark content

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.

At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.

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 €14.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