Skip to content

Using UART

Read from serial port

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 everytime a new byte is recieved on the uart. Use this example and modify it, to be able to turn on and off the LED from a serial terminal.