Skip to content

RPi Pico 2W — Using UART

Reading from the serial port can be done using the gets() function, but we want more low-level control of the data. There is a good example of how to do this in the RPi GitHub: uart_advanced.c.

This example configures the UART and the interrupts, where an interrupt function is called every time a new byte is received on the UART. Use this example and modify it to be able to turn the LED on and off from a serial terminal.