# Using the Serial Connection

The Serial connection provides a way for you to upload your code to your Arduino as well as see the data coming in from sensors and other input components.

## Setup

### For Uploading to your Arduino

In the Arduino program, set up your serial connection.

Go to Tools > Board > Arduino AVR Boards > Arduino Uno (or whatever you have)

![](https://3674232557-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MR1EQixIaV64lGrdh2s%2F-MWhDXKvSZrVJZaWb9g4%2F-MWhGTJmMXMSrtbSK1Zx%2Fimage.png?alt=media\&token=6270f249-5432-458b-9086-d718648b83c4)

![](https://3674232557-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MR1EQixIaV64lGrdh2s%2F-MWhDXKvSZrVJZaWb9g4%2F-MWhGVd1hEvlJL3XsEIp%2Fimage.png?alt=media\&token=987f813b-6c95-4f60-a59a-d10025df8a75)

Once you have the Arduino connected via USB, you can find and select the port that is needed under Tools >  Port > COM(whatever number shows the connection)

![](https://3674232557-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MR1EQixIaV64lGrdh2s%2F-MWhDXKvSZrVJZaWb9g4%2F-MWhGY5435tW-3xwuDnu%2Fimage.png?alt=media\&token=ea9ef3a9-d934-49df-b635-b88e22577cc7)

## Viewing the Info

In your code, in the `setup()` function, use Serial.begin() to establish a connection. In the parentheses, put your baud rate (it has something to do with the connection speed). The most common is 9600.

```cpp
void setup() {
    Serial.begin(9600);   // Start Serial connection
}
```

As long as the Arduino is connected via USB to your computer, you can see this info two ways:

### Serial Monitor

This is like a Console that you can print messages to using `Serial.print()` and `Serial.println()`.

### Serial Plotter

This is a line graph that will interpret numbers in anything printed to the Serial monitor.
