Using the Arduino Serial Port

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.

 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.

Read more: Using the Arduino Serial Port

Leave a Comment

Your email address will not be published. Required fields are marked *