10 Easy Arduino Uno Projects for Beginners

10 Easy Arduino Uno Projects for Beginners

If you’re new to Arduino and electronics, these 10 simple projects will help you start your journey. Each project uses the Arduino Uno R3 and basic components that you can easily buy online.


1. Blink an LED

This is the classic “Hello World” of Arduino. The onboard LED on pin 13 will blink.

void setup() {
  pinMode(13, OUTPUT);
}
void loop() {
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
}

2. LED with Push Button

Turn an LED ON/OFF using a push button.

int button = 2;
int led = 13;

void setup() {
  pinMode(button, INPUT);
  pinMode(led, OUTPUT);
}

void loop() {
  if (digitalRead(button) == HIGH) {
    digitalWrite(led, HIGH);
  } else {
    digitalWrite(led, LOW);
  }
}

3. Buzzer Alarm

Make a piezo buzzer sound when activated.

int buzzer = 8;
void setup() {
  pinMode(buzzer, OUTPUT);
}
void loop() {
  digitalWrite(buzzer, HIGH);
  delay(500);
  digitalWrite(buzzer, LOW);
  delay(500);
}

4. Traffic Light System

Simulate a traffic light with Red, Yellow, and Green LEDs.

int red = 10;
int yellow = 9;
int green = 8;

void setup() {
  pinMode(red, OUTPUT);
  pinMode(yellow, OUTPUT);
  pinMode(green, OUTPUT);
}

void loop() {
  digitalWrite(red, HIGH);
  delay(3000);
  digitalWrite(red, LOW);

  digitalWrite(yellow, HIGH);
  delay(1000);
  digitalWrite(yellow, LOW);

  digitalWrite(green, HIGH);
  delay(3000);
  digitalWrite(green, LOW);
}

5. Temperature & Humidity Monitor (DHT11)

#include "DHT.h"
#define DHTPIN 7
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  dht.begin();
}
void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  Serial.print("Humidity: ");
  Serial.println(h);
  Serial.print("Temp: ");
  Serial.println(t);
  delay(2000);
}

6. Ultrasonic Distance Sensor

Measure distance using an HC-SR04 sensor.

#define trigPin 9
#define echoPin 10
long duration;
int distance;

void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;
  Serial.print("Distance: ");
  Serial.println(distance);
}

7. Servo Motor Control

Rotate a servo motor back and forth.

#include <Servo.h>
Servo myservo;
int pos = 0;

void setup() {
  myservo.attach(9);
}
void loop() {
  for (pos = 0; pos <= 180; pos += 1) {
    myservo.write(pos);
    delay(15);
  }
  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos);
    delay(15);
  }
}

8. Light Sensor (LDR)

Read light intensity using an LDR.

int ldr = A0;
int value = 0;

void setup() {
  Serial.begin(9600);
}
void loop() {
  value = analogRead(ldr);
  Serial.println(value);
  delay(500);
}

9. LCD Display with Hello World

Print text on a 16x2 LCD display.

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Hello, World!");
}
void loop() {}

10. RGB LED Color Mixing

Control RGB LED colors using PWM.

int red = 9;
int green = 10;
int blue = 11;

void setup() {
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
}
void loop() {
  analogWrite(red, 255);
  analogWrite(green, 0);
  analogWrite(blue, 0);
  delay(1000);

  analogWrite(red, 0);
  analogWrite(green, 255);
  analogWrite(blue, 0);
  delay(1000);

  analogWrite(red, 0);
  analogWrite(green, 0);
  analogWrite(blue, 255);
  delay(1000);
}

Each of these beginner projects introduces you to Arduino Uno basics. You can get all the components from the links above and start building today!

Post a Comment

0 Comments