A simple example to allow a Pico to act as a serial terminal into another Raspberry Pi computer. Useful for setting up a Pi when network setup fails for some reason. Should work for Windows, Linux, or Mac host machines.
- Add
enable_uart=1to the Raspberry Pi computerconfig.txtand boot it. - Connect pins
pico:{1,2,3}topi:{10,8,6} - Connect to Pico using Thonny
- From Thonny, run
terminal.pyon Pico, then power up the Pi
You should now have a serial terminal to your Raspberry Pi computer through your Pico.
- Input is only taken a whole line at a time after the EOL character.
- Line input is ALWAYS echoed back to the terminal as a new line, even passwords
- Control characters are dropped so no curses tools (like
raspi-config) work
For a full-fledged serial interface, look at picoprobe referenced in Appendix A of the Pico Getting Started Guide.