Where I expand on creating a web server application on a Pi Pico W by incorporating web sockets.
In the first part of this entry, I introduced the ability to develop an HTTP-based web server using solely HTML to control the Pi Pico pins. I focused on HTTP protocol as you can write everything in the relatively simple language, HTML and it works. I used checkbox or radio button inputs to a form to control pins on the Pico. This is a far more simple approach than using JavaScript. It does introduce some significant delays as each form submission must make a complete round trip (i.e. a page reload).
Where I discuss various serial monitor applications and why I believe CoolTerm is the best one.
The serial port is an invaluable, if not mandatory tool, for developing programs in embedded computing. Given the popularity of software development for embedded computers, one would think there would be a clear answer or solution. For several years, I wasn’t able to determine the best solution. However, after more work on my part to understand a specific solution, I can conclusively say use this multiplatform, free solution: CoolTerm
Where I demonstrate an enhanced on-board shell for RP2040 (Pi Pico and Pi Pico W) using MicroPython, upysh2.py.
While Thonny can be a bit cumbersome if you already know Python, it does have advantages in being able to provide fundamental file management capability. Its helpful to be able to copy files, list files and folders on the Pico, delete files and rename them. Its biggest issue is that a hardware reset will disconnect the board and reconnecting with the board, causes the board to soft reset. Which prevents you from easily running a main.py program via reset. I have also tested this using the new Arduino Lab for MicroPython and it suffers from the same problem. Very disappointing.
Where I begin to develop applications for the RP2040 (Pi Pico and Pi Pico W) using Micropython.
In Getting Started, we created simple programs and used paste mode to enter the programs into the Pico storage. This works well for short programs and particularly well, for debugging. It will continue to be a valuable technique. That said, paste mode becomes cumbersome for developing longer programs and programs with multiple files. For this we want to be able to quickly upload a file or set of files, preferably remaining in our code editor.
Where I describe various methods of debugging programs using MicroPython on the RP2040 (Pi Pico and Pi Pico W).
Programming is a science, debugging is an art. When I chat with students learning to program, I’ve found it isn’t “programming” which causes the most problems, its “what to do when the programming doesn’t work.”
On any new microcontroller, there is a new tool chain and a new process, which affects how you debug. For example, with the AVR family of microcontrollers, you have gdb, bloom as a hardware debugger (which is fantastic!), make and gcc. Or you may use the Arduino framework. Both approaches are well-defined, well-understood and work well.
Where I begin to develop a web server for the RP2040 (Pi Pico and Pi Pico W) using MicroPython and microdot.
The Pico W added wireless capability to the Pico, which brings the ability to network the Pico board. Once a board can be networked, it becomes valuable to have it serve web pages. An HTTP-compliant web page is a simple first step to using the Pico W via a network.
A set of entries which comprise a course for learning how develop MicroPython programs for the RP2040.
An updated look at the utility, mpremote, used to communicate with a board running MicroPython.
A tool which has improved a great deal with the 1.20 release is mpremote - micropython remote control. After using it extensively, I’ve found its biggest issue is the lack of documentation as compared to its capabilities. It is invaluable, if not mandatory for interacting with a MicroPython board.
# to install
pip install mpremote
# to upgrade
pip install --upgrade mpremote
Once installed, use the help command to see the available commands. Make sure CoolTerm is not connected, otherwise you won’t be able to connect to the board via mpremote.
Where I illustrate how to establish a wireless connection using the Pi Pico W.
When the Pico W was introduced, there was finally a great product from Raspberry Pi to compete with the ESP32. The ESP32-based products are good, however, I prefer the Pi Pico-based products due to superior support and documentation due to its ARM Cortex-based architecture. The Pico W added wireless capability to the Pico, which brought the ability to network the Pico board. It also added bluetooth, which will be a different tutorial.
Where I demonstrate how to begin to program the RP2040 (Pi Pico and Pi Pico W) using Micropython.
I already have quite a few entries on Micropython. While I’ve experimented with multiple boards using the language, ESP32, FIDI, and the Adafruit Feather RP2040, this entry begins a set of entries on using Micropython as a development language with the Pi Pico W as the development microcontroller. The cost ($6) of the Pico W, with it’s computing power and wireless capability coupled with the ease of development of Micropython, makes this combination compelling.