Using the Arduino Serial Port

The Arduino Uno can send data (such as a text message) to the PC over the USB cable. The Arduino IDE has a serial monitor window that can be opened and will receive and display the data sent from the Arduino board. Data can also be sent to the Arduino board from the serial monitor.

Using the Arduino Serial Port

This serial communication is very useful for controlling electronics that is connected to (interfaced to) the Arduino board from the PC. It can also be used to debug (find errors in) Arduino programs when writing new programs.

The following videos show what you will achieve in this tutorial.


Complete tutorial 3 – Starting with Arduino before attempting this tutorial.


All that is needed is an Arduino Uno board, standard USB cable and PC with the Arduino IDE software installed. You will already have these if you have completed tutorial 3.

Sending Data to PC from the Arduino

Copy the serial_tx_msg Arduino sketch below and paste it into the Arduino IDE.

  Program:     serial_tx_msg
               (serial transmit message)

  Description:  Sends a text message out of the serial (USB)
                port of the Arduino every second.

                Use the Arduino Serial Monitor to receive the

  Date:         3 March 2012

  Author:       W.A. Smith,

void setup() {

void loop() {
  Serial.println("Hello, world!");
}Compile the program by clicking the "Verify" button in the Arduino IDE. Upload the program to the Arduino board by clicking the "Upload" button.

Now start the serial monitor by clicking the “Serial Monitor” button in the Arduino IDE. The figure below shows the location of the serial monitor in Arduino IDE version 1.0 (top) and Arduino IDE version 0022 (bottom).


For more detail: Using the Arduino Serial Port


About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Scroll to Top