Go back

Serial Hello World: Your First Arduino Communication Project

Welcome to the world of serial communication! In this tutorial, we’ll build a simple “Serial Hello World” project using the Velxio in-browser simulator. You’ll learn how to send messages from an Arduino Uno to your computer’s Serial Monitor. This is the foundation for countless projects—from sensor readouts to debugging complex code.

What You’ll Build

We’ll create a circuit with just an Arduino Uno (no external components needed) and write a sketch that prints a greeting and the system uptime every two seconds. You’ll see the output in the Serial Monitor built into Velxio.

Circuit Walkthrough

Circuit diagram of serial-hello on the Velxio simulator canvas

The circuit is minimal: only an Arduino Uno board. No wires, no LEDs, no resistors. The Arduino communicates with your computer via its built-in USB-to-serial converter. In Velxio, this is simulated automatically—you don’t need to connect anything.

To add the Arduino Uno to your canvas:

  1. Click the + button in the canvas toolbar (shown below) to open the component picker. Velxio canvas toolbar above the simulation viewport
  2. In the component picker, browse by category or search for “Arduino Uno”. Velxio component picker modal browsing parts by category
  3. Click to place it on the canvas.

That’s it! Your circuit is ready.

Code Walkthrough

Source code for serial-hello in the Velxio Monaco editor

Here’s the complete sketch:

// Serial Communication Example
// Send messages to Serial Monitor

void setup() {
  Serial.begin(9600);
  Serial.println("Hello, Arduino!");
  Serial.println("System initialized");
}

void loop() {
  Serial.print("Uptime: ");
  Serial.print(millis() / 1000);
  Serial.println(" seconds");
  delay(2000);
}

Let’s break it down:

Running the Simulation

  1. Click the Run button in the editor toolbar. Velxio editor toolbar with compile and run controls
  2. Open the Serial Monitor from the canvas toolbar (usually a magnifying glass icon or a terminal icon).
  3. You should see:
    Hello, Arduino!
    System initialized
    Uptime: 0 seconds
    Uptime: 2 seconds
    Uptime: 4 seconds
    ...

Key Concepts

Common Pitfalls & Debugging Tips

Suggested Extensions

  1. Read user input: Use Serial.read() or Serial.parseInt() to receive commands from the Serial Monitor and control an LED.
  2. Send sensor data: Connect a potentiometer or temperature sensor and print its value.
  3. Multiple messages: Print formatted data using Serial.print() with multiple variables.
  4. Add a library: Use the Library Manager to include a library like SoftwareSerial for additional serial ports. Velxio Library Manager modal listing installed Arduino libraries

Try It Yourself

Ready to experiment? Open the live example in Velxio and modify the code: change the greeting, adjust the delay, or add a counter. The best way to learn is by doing.

👉 Open Serial Hello World in Velxio

Happy coding!


Share this post on:
David Montero

Written by

David Montero

Creator of Velxio, the open-source circuit and Arduino simulator.

GitHub velxio.dev

Related posts


Previous Post
RGB LED Color Cycling with Arduino on Velxio
Next Post
Fade an LED with PWM on Arduino – Beginner Tutorial