Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Raspberry Pi Pico DIY Workshop

You're reading from  Raspberry Pi Pico DIY Workshop

Product type Book
Published in May 2022
Publisher Packt
ISBN-13 9781801814812
Pages 376 pages
Edition 1st Edition
Languages
Authors (2):
Sai Yamanoor Sai Yamanoor
Profile icon Sai Yamanoor
Srihari Yamanoor Srihari Yamanoor
Profile icon Srihari Yamanoor
View More author details

Table of Contents (17) Chapters

Preface 1. Section 1: An Introduction to the Pico
2. Chapter 1: Getting Started with the Raspberry Pi Pico 3. Chapter 2: Serial Interfaces and Applications 4. Chapter 3: Home Automation Projects 5. Chapter 4: Fun with Gardening! 6. Section 2: Learning by Making
7. Chapter 5: Building a Weather Station 8. Chapter 6: Designing a Giant Seven-Segment Display 9. Chapter 7: Designing a Visual Aid for Tracking Air Quality 10. Section 3: Advanced Topics
11. Chapter 8: Building Wireless Nodes 12. Chapter 9: Let's Build a Robot! 13. Chapter 10: Designing TinyML Applications 14. Chapter 11: Let's Build a Product! 15. Chapter 12: Best Practices for Working with the Pico 16. Other Books You May Enjoy

Using the display

In this section, we will discuss driving the displays in two ways: with a simple web server running on the Pico and via a serial port.

Let's get started!

Simple web server

In this example, we will host a simple web server on the Pico so that we can update the display using a browser from any device on a local network. This example is based on the esp32spi_wsgiserver example made available from Adafruit (link: https://bit.ly/3itHrmY). We made some simple modifications to the code sample to adapt it to our example. The modified code sample is available for download from this chapter's repository as code_server.py (link: https://bit.ly/3hqWA7X).

The changes made to the server example include the following:

  • Importing the seven_segment driver so that we can update the display when there is a request:
    import seven_segment
  • We updated the GPIO pin numbers to drive the ESP32 wireless pack:
    # If you have an externally connected ESP32:
    esp32_cs...
lock icon The rest of the chapter is locked
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.
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}