What does the Baud rate setting mean for a USB-serial connection? Since communication between an Arduino and a PC is done over a USB port and not a serial port, I had assumed that the Baud rate setting didn't do anything, but was just an left-over from the days when serial ports were actually serial ports and not just USB ports in disguise. However, all the example code sets the Baud rate, which makes it look like it is important. Does this mean that it's important to make sure that the serial port on the PC is configured to use the same Baud rate as the Arduino?
Since communication between an Arduino and a PC is done over a USB port and not a serial port
It is done by a chip the converts the serial data sent by the Arduino to USB data. The driver on the PC that talks to the Arduino converts the USB data back to serial data.
However, all the example code sets the Baud rate, which makes it look like it is important.
Only because it is.
Does this mean that it's important to make sure that the serial port on the PC is configured to use the same Baud rate as the Arduino?
Yes, I get that that's the general idea behind how the bus works, but I was after something more detailed. Is the point that the Baud rate setting used on the PC end of USB determines the Baud rate used by the UART and the Baud rate setting on the Arduino sets the Baud rate used by the Arduino?
The baud rate setting is not used at the PC end except to initialise the pseudo serial port. However that information is used by the USB / serial bridge then real serial data comes out of it. This is then connected to the real serial I/O of the arduino. Unless the arduino and USB bridge talk at the same speed nothing will be transferred.