Had my first encounter with a Raspberry Pi Pico today.
I needed a MCU that could enumerate two USB serial ports to a host, have a UART interface for an external device, and control a heap of GPIOs. The RPi Pico was a little light on GPIOs, but add a couple of I²C expanders, and we were in business. The idea was one USB serial interface (call it port 1) would be for control commands, and serial traffic on the other (port 2).
The UART on the thing is hooked up to a multiplexing circuit with two RS-485 transceivers and a TTL buffer, so via port 1, I can put port 2 into any of: TTL serial, RS-485 (via either transceiver), or RS-422 (both transceivers, using one for receive and the other for transmit). The GPIOs sense things through optical isolators and tickle devices via reed relays.
Haven't wired the thing up yet, but TinyUSB has a dual CDC-ACM example that was a doddle to get going on the Pico… so I don't expect it to be a big job.
Not sure if this can be done in #MicroPython … I think I'll be using C, but that's fine, C will get the job done.
Tomorrow should be interesting.