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