Arduino Fundamentals & Basic Electronics Projects
Main Goal:
Learn core Arduino basics and digital/analog I/O through practical beginner-friendly projects.
Table of Contents:
1. Blinking LED ........................................ Page 3
2. Button-Controlled LED / Buzzer ........................................ Page 4
3. Traffic Light Controller ........................................ Page 5
4. LDR-Based Night Light ........................................ Page 6
5. Morse Code Flasher ........................................ Page 7
6. SOS Signal Generator ........................................ Page 8
7. Dice Simulator ........................................ Page 9
Blinking LED - Beginner
Components Needed:
- Arduino Uno
- 220-ohm resistor
- Red LED
- Jumper wires
- Breadboard
Step-by-Step Connections:
1. Connect the longer leg (anode) of LED to pin 13 on Arduino.
2. Connect the shorter leg (cathode) to one end of a 220-ohm resistor.
3. Connect the other end of the resistor to GND.
4. Upload the code.
Sketch (Code):
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
Page 1
Arduino Fundamentals & Basic Electronics Projects
delay(1000);
}
How it Works:
This sketch turns the LED on and off every second using digital pin 13.
Button-Controlled LED / Buzzer - Beginner
Components Needed:
- Arduino Uno
- Push button
- 10k resistor
- LED or Buzzer
- Breadboard and jumper wires
Step-by-Step Connections:
1. Connect one leg of button to pin 2 and the other to GND.
2. Add a 10k pull-up resistor between pin 2 and 5V.
3. Connect LED anode to pin 13 via 220-ohm resistor; cathode to GND.
4. Upload the code.
Sketch (Code):
void setup() {
pinMode(2, INPUT);
pinMode(13, OUTPUT);
}
void loop() {
int buttonState = digitalRead(2);
digitalWrite(13, buttonState);
}
How it Works:
LED turns on only when button is pressed. DigitalRead checks button input.
Traffic Light Controller - Beginner
Components Needed:
- Arduino Uno
- Red, Yellow, Green LEDs
- 220-ohm resistors
Page 2
Arduino Fundamentals & Basic Electronics Projects
- Jumper wires, Breadboard
Step-by-Step Connections:
1. Connect Red LED to pin 8 via 220-ohm resistor.
2. Yellow to pin 9, Green to pin 10 the same way.
3. GND all LED cathodes.
4. Upload the sketch.
Sketch (Code):
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
}
void loop() {
digitalWrite(10, HIGH); delay(3000); digitalWrite(10, LOW); // Green
digitalWrite(9, HIGH); delay(1000); digitalWrite(9, LOW); // Yellow
digitalWrite(8, HIGH); delay(3000); digitalWrite(8, LOW); // Red
}
How it Works:
Simulates traffic signal cycling using delays between LED states.
LDR-Based Night Light - Beginner
Components Needed:
- Arduino Uno
- LDR
- 10k resistor
- LED + 220-ohm resistor
- Jumper wires, Breadboard
Step-by-Step Connections:
1. Connect LDR between 5V and A0.
2. Connect 10k resistor from A0 to GND.
3. Connect LED to pin 13 through 220-ohm resistor.
4. Upload the sketch.
Sketch (Code):
Page 3
Arduino Fundamentals & Basic Electronics Projects
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
int light = analogRead(A0);
if(light < 500)
digitalWrite(13, HIGH);
else
digitalWrite(13, LOW);
}
How it Works:
Lights up the LED when ambient light falls below a threshold.
Page 4