A Hands-On Adventure

🎈 Arduino Projects
Booklet for Kids

15 fun, easy builds using your Arduino kit β€” with wiring pictures, step-by-step instructions and ready-to-copy code. No experience needed. Let's make things that blink, beep, roll and react!

πŸ”Œ Arduino + cable πŸ€– Motors + L293D πŸ“‘ HC-05 Bluetooth πŸ‘οΈ IR sensors πŸ¦‡ Ultrasonic 🦾 SG90 servo 🧱 Breadboard πŸ”Š Buzzer 🌑️ DHT11 πŸ–₯️ I2C display 🍷 MQ3 gas sensor ⚑ Relay 🚢 PIR motion πŸ”˜ Buttons & more!

πŸ“– How to use this booklet

Each project has 4 parts:

πŸ–οΈ Color rule for wires

RED = power (5V)    BLACK = ground (GND)    ORANGE = signal wires (data)

If you only have one color of jumper wire, that's totally fine β€” just follow the pin letters on the pictures!

πŸ—ΊοΈ The 15 projects

  1. 1 Blinking LED β€” Hello World!
  2. 2 Traffic Light
  3. 3 Melody Maker (Buzzer)
  4. 4 SOS Signal
  5. 5 Servo with Buttons
  6. 6 Ultrasonic Distance Meter
  7. 7 Smart Parking Sensor
  8. 8 Obstacle-Avoiding Robot
  9. 9 Line-Following Robot
  10. 10 Bluetooth Robot
  11. 11 Motion-Activated Light
  12. 12 Clap Switch
  13. 13 Temperature & Humidity Monitor
  14. 14 Alcohol Detector
  15. 15 Home Automation Switchboard

πŸš€ Getting started (for beginners)

  • Get the free app. Ask a grown-up to download Arduino IDE from arduino.cc (it's free!).
  • Plug in your Arduino with the USB cable. The little green light should turn ON.
  • Choose your board. In the app, click Tools β†’ Board β†’ Arduino Uno.
  • Choose the port. Click Tools β†’ Port and pick the one with your Arduino (it usually has "USB" in the name).
  • Copy the code from this booklet into the white box in the app.
  • Press Upload (the ➑️ arrow button). Wait a few seconds… and watch your project come alive! πŸŽ‰
  • ⚠️ Safety rules (very important!)

    🧩 Two little tricks every maker should know

    1. The long leg of an LED connects toward power (+). If your LED won't light, try turning it around!

    2. Buttons love INPUT_PULLUP. When we use a button in the code, we connect it between the pin and GND β€” the code's INPUT_PULLUP makes it work perfectly. Pressed = LOW.

    🧰 Meet your components

    These are the parts in your kit. The pictures in each project show exactly which ones to use.

    πŸ”΅ Arduino UNO + USB cable

    The brain of every project. It reads sensors, thinks, and controls things.

    Where the code goes: plug the cable into your computer and press Upload.

    🧱 Breadboard

    A board full of holes that lets you connect wires without soldering. The rows on each side are connected together inside.

    Hint: the two long rails (often red & blue lines) are for 5V and GND.

    🟠 L293D motor driver chip

    A bodyguard for your motors. It lets the Arduino drive the big motors without breaking.

    Needed for robot projects 8, 9 and 10.

    πŸ›ž Chassis kit (wheels + 2 motors + battery box)

    The legs of your robot β€” two gear motors, wheels and a body.

    Needed for robot projects 8, 9 and 10.

    πŸ¦‡ HC-SR04 ultrasonic sensor

    Sends a sound "ping" (too high for ears) and listens for the echo β€” like a bat! Measures how far things are.

    Pins: VCC, Trig, Echo, GND.

    🦾 SG90 servo motor

    A motor that turns to an exact angle (0Β° to 180Β°). Great for looking left/right or moving things.

    3 wires: orange = signal, red = 5V, brown = GND.

    πŸ‘οΈ IR sensor (x2)

    An infrared eye that sees light we can't see. In a robot it can tell black line vs white floor.

    Pins: VCC, GND, OUT. Needed for the Line-Following Robot.

    πŸ“‘ HC-05 Bluetooth module

    Lets your phone talk to the Arduino without wires! You control the robot from an app.

    Pins: VCC, GND, TX, RX.

    πŸ’‘ LED + resistor

    A tiny light bulb that lights up when power flows. The resistor protects it from too much power.

    Long leg = + side. Use a 220Ω–330Ξ© resistor.

    πŸ”Š Buzzer

    Makes beeps and songs! Arduino can play different notes with it.

    Long leg (+) and short leg (βˆ’). Some buzzers are "active" (beep when powered) and some are "passive" β€” every project here uses tone(), which works with both!

    🎀 Sound sensor

    Hears loud sounds like a clap and sends a signal.

    Pins: VCC, GND, DO (digital out). Use the blue knob to set how loud a sound triggers it.

    🚢 PIR motion sensor

    Feels movement (heat from people or animals moving). Perfect for alarms and auto-lights.

    Pins: VCC, OUT, GND. It needs ~2 seconds to "wake up".

    🌑️ DHT11 temperature & humidity sensor

    Measures how hot and how wet the air is.

    Pins: VCC, DATA, GND. Needs the DHT library (see project 13).

    πŸ–₯️ I2C LCD display (16x2)

    A small screen that shows 2 lines of 16 letters/numbers. The I2C part means only 4 wires needed!

    Pins: VCC, GND, SDA β†’ A4, SCL β†’ A5.

    🍷 MQ3 gas sensor

    Smells alcohol and gases in the air. It outputs a bigger number when it smells more.

    Pins: VCC, GND, AO (analog). Needs ~30 seconds warm-up.

    ⚑ Relay module

    An electric switch. Arduino flips it to turn big things (like a lamp) ON and OFF safely.

    Pins: VCC, GND, IN. Plus COM / NO for the thing it switches.

    πŸ”˜ Push buttons (x3)

    Little switches you press with your finger. Great for menus and remote control.

    Use any two opposite legs. In our projects: pin ↔ GND with INPUT_PULLUP.

    🎚️ Slide switch

    A simple ON/OFF switch. Best used in robots to turn the power on and off without unplugging.

    Put it in series with the battery box (+) wire.

    🧡 Jumper wires

    The roads that carry electricity between parts.

    MM = male-to-male (the usual ones). Need M-F for sensors with pins.

    1

    πŸ’‘ Blinking LED

    Your very first circuit β€” make an LED twinkle like a star!

    β˜…β˜†β˜† Super easy ⏱️ 10 minutes 🧠 Learn: outputs & delay
    πŸ’‘ 1 LED πŸ”Œ 1 resistor (220Ξ©) 🧱 Breadboard 🧡 2–3 jumper wires πŸ”΅ Arduino + cable

    πŸ” What you will make

    An LED that turns ON for one second, then OFF for one second β€” forever! This is the classic "Hello World!" of electronics. If you can do this, you can do anything in this book.

    🧠 How it works

    The Arduino is a tiny computer. We tell pin D13 to push electricity out (that turns the LED ON), then tell it to stop (LED OFF). The delay(1000) line makes it wait 1000 milliseconds = 1 second between changes.

    The resistor protects the LED β€” too much electricity would make it pop! πŸ’₯

    πŸ”Œ Wire it up

    Arduino UNO USB cable β†’ computer D13 GND + βˆ’ R 220Ξ© LED

    πŸ”Ž See the table below for the exact connections.

    From (Arduino / part)To (part)Wire color
    D13Resistor one leg β†’ LED long legOrange
    GNDLED short legBlack

    πŸ’» The Code

    // PROJECT 1: Blinking LED
    // The LED turns ON and OFF, again and again... like a twinkling star!
    
    int ledPin = 13;            // The LED is connected to pin 13
    
    void setup() {
      pinMode(ledPin, OUTPUT);  // Tell the pin: "You send electricity out!"
    }
    
    void loop() {
      digitalWrite(ledPin, HIGH);  // Turn the LED ON
      delay(1000);                 // Wait 1 second
      digitalWrite(ledPin, LOW);   // Turn the LED OFF
      delay(1000);                 // Wait 1 second
    }

    πŸ’‘ Copy everything from int ledPin to the last }.

    πŸš€ Test it!

    1. Connect everything exactly like the picture (power OFF!).
    2. Plug in the USB cable and upload the code.
    3. Watch the LED blink β€” ON, OFF, ON, OFF… ⭐
    4. If it doesn't light up, turn the LED legs around!

    🌟 Try this!

    • Change delay(1000) to delay(100) β€” now it blinks super fast!
    • Make a pattern: blink twice fast, then once slow.
    • Connect 3 LEDs to pins 13, 12 and 11 β€” make them blink in a wave 🌊.
    2

    🚦 Traffic Light

    Build a real traffic light β€” red, yellow, green, GO!

    β˜…β˜†β˜† Super easy ⏱️ 15 minutes 🧠 Learn: 3 outputs at once
    πŸ’‘ 3 LEDs (red, yellow, green) πŸ”Œ 3 resistors (220Ξ©) 🧱 Breadboard 🧡 6–8 jumper wires

    πŸ” What you will make

    Three LEDs that change exactly like a real traffic light: Red β†’ Yellow β†’ Green β†’ Yellow β†’ Red… Cars would be very impressed. πŸš—

    🧠 How it works

    Each LED has its own pin (D2, D3, D4). We turn one ON and the others OFF, wait, then switch. The delay() decides how long each light stays.

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D2 D3 D4 GND + βˆ’ R RED R YELLOW R GREEN

    πŸ”Ž Tip: on a breadboard you can join all the short legs to the long black (βˆ’) rail.

    From (Arduino)To (LED)Wire color
    D2 β†’ resistorRed LED long legOrange
    D3 β†’ resistorYellow LED long legOrange
    D4 β†’ resistorGreen LED long legOrange
    GNDAll 3 LED short legs (join them on the βˆ’ rail)Black

    πŸ’» The Code

    // PROJECT 2: Traffic Light
    // Red, yellow, green... just like a real crossing!
    
    int red = 2;       // Red LED on pin 2
    int yellow = 3;    // Yellow LED on pin 3
    int green = 4;     // Green LED on pin 4
    
    void setup() {
      pinMode(red, OUTPUT);
      pinMode(yellow, OUTPUT);
      pinMode(green, OUTPUT);
    }
    
    void loop() {
      digitalWrite(red, HIGH);     // Red ON
      digitalWrite(yellow, LOW);
      digitalWrite(green, LOW);
      delay(3000);                 // Cars stop for 3 seconds
    
      digitalWrite(red, LOW);
      digitalWrite(yellow, HIGH);  // Yellow ON
      delay(1000);
    
      digitalWrite(yellow, LOW);
      digitalWrite(green, HIGH);   // Green ON - GO!
      delay(3000);
    
      digitalWrite(green, LOW);
      digitalWrite(yellow, HIGH);  // Yellow again
      delay(1000);
      digitalWrite(yellow, LOW);
    }

    πŸš€ Test it!

    1. Wire the 3 LEDs exactly like the picture.
    2. Upload the code and watch the lights change.
    3. Count the seconds β€” is it like a real traffic light?

    🌟 Try this!

    • Make the green light blink 3 times before turning yellow (like some real lights!).
    • Add a 4th LED as a "walking man" 🚢 that turns on when the cars stop.
    3

    🎡 Melody Maker

    Press a button and the buzzer plays a real song!

    β˜…β˜…β˜† Easy ⏱️ 15 minutes 🧠 Learn: buttons & sound
    πŸ”Š 1 buzzer πŸ”˜ 1 push button 🧱 Breadboard 🧡 4 jumper wires

    πŸ” What you will make

    Press the button and the buzzer plays "Twinkle Twinkle Little Star"! ✨ The Arduino becomes a little music box.

    🧠 How it works

    Every note is just a frequency β€” how fast the buzzer wiggles. The tone() command plays a note, and noTone() stops it. We store the song as two lists: the notes and how long each one lasts.

    The button uses INPUT_PULLUP: when pressed, the pin reads LOW (0).

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D8 D7 GND BUZZER + βˆ’ PUSH D8 D7 GND

    πŸ”Ž Buzzer legs: one long (+), one short (βˆ’). Button: use any two opposite legs.

    From (Arduino)To (part)Wire color
    D8Buzzer + legOrange
    GNDBuzzer βˆ’ legBlack
    D7Button one legOrange
    GNDButton other legBlack

    πŸ’» The Code

    // PROJECT 3: Melody Maker
    // Press the button and the buzzer plays Twinkle Twinkle Little Star!
    
    int buttonPin = 7;   // Button on pin 7
    int buzzerPin = 8;   // Buzzer on pin 8
    
    // The notes of the song (frequency in Hertz)
    int melody[] = { 262, 262, 392, 392, 440, 440, 392,
                     349, 349, 330, 330, 294, 294, 262 };
    
    // How long each note plays (milliseconds)
    int noteTime[] = { 400, 400, 400, 400, 400, 400, 800,
                       400, 400, 400, 400, 400, 400, 800 };
    
    void setup() {
      pinMode(buttonPin, INPUT_PULLUP);  // Button with built-in helper
      pinMode(buzzerPin, OUTPUT);
    }
    
    void loop() {
      if (digitalRead(buttonPin) == LOW) {   // If the button is pressed
        for (int i = 0; i < 14; i++) {       // Play every note one by one
          tone(buzzerPin, melody[i]);        // Start the note
          delay(noteTime[i]);                // Let it play
        }
        noTone(buzzerPin);                   // Stop playing
        delay(500);
      }
    }

    πŸš€ Test it!

    1. Wire the buzzer and button like the picture.
    2. Upload the code.
    3. Press and hold the button… and sing along! 🎀

    🌟 Try this!

    • Change the numbers in melody[] to write your own song! Bigger number = higher note.
    • Make it play "Happy Birthday" β€” the tune is: 262,262,294,262,349,330…
    • Add a blinking LED that flashes with the music (like a concert!).
    4

    πŸ†˜ SOS Signal

    Send a real SOS with light and sound β€” like a sailor in trouble!

    β˜…β˜…β˜† Easy ⏱️ 15 minutes 🧠 Learn: your own functions
    πŸ’‘ 1 LED πŸ”Œ 1 resistor (220Ξ©) πŸ”Š 1 buzzer πŸ”˜ 1 push button 🧱 Breadboard + jumpers

    πŸ” What you will make

    Press the button and your Arduino sends SOS β€” the world-famous "help me!" signal: 3 short, 3 long, 3 short (… --- …) with flashing light and beeping sound!

    🧠 How it works

    We write two helper functions: dot() (quick blink + beep) and dash() (long blink + beep). Then sending SOS is as easy as saying: dot, dot, dot, dash, dash, dash, dot, dot, dot!

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D13 D8 D7 GND R LED BUZZER + βˆ’ D8 PUSH D7 GND bus
    From (Arduino)To (part)Wire color
    D13 β†’ resistorLED long legOrange
    GNDLED short legBlack
    D8Buzzer + legOrange
    GNDBuzzer βˆ’ legBlack
    D7Button one legOrange
    GNDButton other legBlack

    πŸ’» The Code

    // PROJECT 4: SOS Signal
    // Press the button: ... --- ... (SOS) with light AND sound!
    
    int ledPin = 13;
    int buzzerPin = 8;
    int buttonPin = 7;
    
    void setup() {
      pinMode(ledPin, OUTPUT);
      pinMode(buzzerPin, OUTPUT);
      pinMode(buttonPin, INPUT_PULLUP);
    }
    
    void loop() {
      if (digitalRead(buttonPin) == LOW) {  // Button pressed?
        dot();  dot();  dot();   // S = short short short
        dash(); dash(); dash();  // O = long long long
        dot();  dot();  dot();   // S = short short short
        delay(1500);             // Rest before the next SOS
      }
    }
    
    // A short blink + beep
    void dot() {
      digitalWrite(ledPin, HIGH);
      tone(buzzerPin, 1000);
      delay(200);
      noTone(buzzerPin);
      digitalWrite(ledPin, LOW);
      delay(200);
    }
    
    // A long blink + beep
    void dash() {
      digitalWrite(ledPin, HIGH);
      tone(buzzerPin, 1000);
      delay(600);
      noTone(buzzerPin);
      digitalWrite(ledPin, LOW);
      delay(200);
    }

    πŸš€ Test it!

    1. Wire everything like the picture.
    2. Upload the code and press the button.
    3. Count the beeps: 3 short, 3 long, 3 short β€” that's SOS! πŸ†˜

    🌟 Try this!

    • Make it send your name in Morse code. A = dot-dash, B = dash-dot-dot-dot…
    • Hold the button and let it SOS forever (loop forever instead of once).
    5

    🦾 Servo with Buttons

    Three buttons move a robot arm left, right… and back home!

    β˜…β˜…β˜† Easy ⏱️ 20 minutes 🧠 Learn: the Servo library
    🦾 1 SG90 servo πŸ”˜ 3 push buttons 🧱 Breadboard 🧡 8 jumper wires

    πŸ” What you will make

    Three buttons control a servo (a motor that turns to exact angles): left button turns it left, right button turns it right, and home button pops it back to the middle. It's like a tiny robot arm controller! πŸ€–

    🧠 How it works

    The Servo library is a ready-made helper. We just say myServo.write(angle) and the servo turns to that angle (0Β° to 180Β°). Each button press changes the angle a little. The servo has 3 wires: orange = signal (tells it where to go), red = power (5V), brown = ground (GND).

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D9 5V GND D2 D3 D4 ARM SG90 SERVO orange red brown signal 5V GND LEFT D2 RIGHT D3 HOME D4
    From (Arduino)To (part)Wire color
    D9Servo orange wire (signal)Orange
    5VServo red wire (power)Red
    GNDServo brown wire + all 3 button one-legsBlack
    D2LEFT button other legOrange
    D3RIGHT button other legOrange
    D4HOME button other legOrange

    πŸ’» The Code

    // PROJECT 5: Servo with Buttons
    // LEFT = turn left, RIGHT = turn right, HOME = back to the middle!
    
    #include <Servo.h>
    
    Servo myServo;              // Make a servo object
    
    int leftButton = 2;         // Left button
    int rightButton = 3;        // Right button
    int homeButton = 4;         // Home button
    
    int angle = 90;             // Servo starts at 90 degrees
    
    void setup() {
      myServo.attach(9);        // Signal wire on pin 9
      pinMode(leftButton, INPUT_PULLUP);
      pinMode(rightButton, INPUT_PULLUP);
      pinMode(homeButton, INPUT_PULLUP);
      myServo.write(angle);     // Start in the middle
      delay(300);
    }
    
    void loop() {
      if (digitalRead(leftButton) == LOW) {
        angle = angle - 5;      // Turn a little to the left
      }
      if (digitalRead(rightButton) == LOW) {
        angle = angle + 5;      // Turn a little to the right
      }
      if (digitalRead(homeButton) == LOW) {
        angle = 90;             // Jump back to the middle
      }
    
      if (angle < 0)    angle = 0;      // Don't go past 0Β°
      if (angle > 180)  angle = 180;    // Don't go past 180Β°
    
      myServo.write(angle);     // Move the servo!
      delay(20);                // A tiny pause so it feels smooth
    }

    πŸš€ Test it!

    1. Wire the servo and buttons like the picture (servo red to 5V!).
    2. Upload the code.
    3. Hold LEFT or RIGHT β€” watch the arm swing. Press HOME β€” snap back!
    ⚠️ The servo can turn itself off if it gets stuck. Don't force the arm with your fingers β€” let it move freely.

    🌟 Try this!

    • Tape a paper arrow to the arm and make a weather vane 🌬️.
    • Change 5 to 20 in the buttons β€” the arm jumps in bigger steps!
    • Use HOME as a "yes/no" pointer and play 20 questions with a friend.
    6

    πŸ“ Ultrasonic Distance Meter

    Measure how far things are β€” and show it on a screen!

    β˜…β˜…β˜† Easy ⏱️ 25 minutes 🧠 Learn: sensors & the LCD
    πŸ¦‡ 1 ultrasonic sensor (HC-SR04) πŸ–₯️ 1 I2C LCD display 🧱 Breadboard 🧡 8 jumper wires

    πŸ” What you will make

    A device that sends a sound "ping", listens for the echo, and shows "Distance: 25 cm" on the screen β€” just like a bat finding its way in the dark! πŸ¦‡

    🧠 How it works

    The sensor shoots an ultrasonic ping (too high for humans to hear) and measures how long it takes to bounce back. Sound travels about 0.034 cm per microsecond, and it goes there and back, so we halve the answer.

    The LCD uses I2C β€” a clever "two-wire" chat system β€” so it only needs SDA (data) and SCL (clock) wires.

    πŸ”Œ Wire it up

    Arduino UNO USB → computer 5V D7 D6 GND A4 A5 HC-SR04 VCC Trig Echo GND Distance: 25 cm LCD 16x2 (I2C) VCC GND SDA SCL 5V GND Trig→D7 Echo→D6 SDA→A4 SCL→A5
    From (Arduino)To (HC-SR04)Wire color
    5VVCCRed
    D7TrigOrange
    D6EchoOrange
    GNDGNDBlack
    From (Arduino)To (LCD I2C)Wire color
    5VVCCRed
    GNDGNDBlack
    A4SDAGreen
    A5SCLGreen

    πŸ“š Libraries you need

    For this project (and projects 13 & 14) we use the LiquidCrystal_I2C library. In the Arduino app: Sketch β†’ Include Library β†’ Manage Libraries, search LiquidCrystal I2C by Frank de Brabander, and click Install. Done!

    πŸ’» The Code

    // PROJECT 6: Distance Meter
    // Measure distances and show them on the LCD screen!
    
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
    
    LiquidCrystal_I2C lcd(0x27, 16, 2);   // Our 16x2 screen
    
    int trigPin = 7;
    int echoPin = 6;
    
    void setup() {
      pinMode(trigPin, OUTPUT);
      pinMode(echoPin, INPUT);
      lcd.init();               // Start the screen
      lcd.backlight();          // Turn on the light
      lcd.print("Distance:");   // Write a title
    }
    
    void loop() {
      // Send a little "ping"
      digitalWrite(trigPin, LOW);
      delayMicroseconds(2);
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
    
      // How long until the echo comes back?
      long time = pulseIn(echoPin, HIGH);
    
      // Turn time into centimetres
      int distance = time * 0.034 / 2;
    
      lcd.setCursor(0, 1);          // Go to line 2
      lcd.print(distance);
      lcd.print(" cm     ");        // Extra spaces wipe old numbers
    
      delay(300);
    }

    πŸ’‘ If the screen shows nothing or boxes β–―β–―β–―, your LCD address might be 0x3F instead of 0x27 β€” just change the number!

    πŸš€ Test it!

    1. Wire the sensor and screen like the picture.
    2. Install the library (see the blue box above).
    3. Upload the code. Move your hand closer and farther β€” watch the numbers change!

    🌟 Try this!

    • Add a buzzer that beeps when something is closer than 20 cm.
    • Measure the length of your room β€” point it at the wall and read the cm!
    • Make it show inches too (cm Γ· 2.54).
    7

    πŸ…ΏοΈ Smart Parking Sensor

    Like the beeping thing in a real car β€” green, yellow, RED… BEEP BEEP!

    β˜…β˜…β˜† Easy ⏱️ 25 minutes 🧠 Learn: if / else if decisions
    πŸ¦‡ 1 ultrasonic sensor πŸ’‘ 3 LEDs (green, yellow, red) πŸ”Œ 3 resistors (220Ξ©) πŸ”Š 1 buzzer 🧱 Breadboard + jumpers

    πŸ” What you will make

    Put this near a wall and watch: far away = green light, getting close = yellow + slow beeps, too close! = red + fast beeps. It's exactly how a real car's parking sensor works! πŸš—

    🧠 How it works

    The ultrasonic sensor measures the distance (like Project 6). Then the code decides what to do with if / else if: over 40 cm β†’ green, 20–40 cm β†’ yellow, under 20 cm β†’ red and BEEEEEP. The closer, the faster the beeps!

    πŸ”Œ Wire it up

    Arduino UNO USB → computer D7 D6 D2 D3 D4 D8 GND 5V HC-SR04 VCC Trig Echo GND Trig→D7 Echo→D6 R GREEN YELLOW RED BUZZER D8
    PartPinArduino
    HC-SR04VCC / Trig / Echo / GND5V / D7 / D6 / GND
    Green LED+ leg (via resistor) / βˆ’ legD2 / GND
    Yellow LED+ leg (via resistor) / βˆ’ legD3 / GND
    Red LED+ leg (via resistor) / βˆ’ legD4 / GND
    Buzzer+ / βˆ’D8 / GND

    πŸ’» The Code

    // PROJECT 7: Smart Parking Sensor
    // Far = green, middle = yellow, close = RED + fast beeps!
    
    int trigPin = 7;
    int echoPin = 6;
    int greenLed = 2;
    int yellowLed = 3;
    int redLed = 4;
    int buzzerPin = 8;
    
    void setup() {
      pinMode(trigPin, OUTPUT);
      pinMode(echoPin, INPUT);
      pinMode(greenLed, OUTPUT);
      pinMode(yellowLed, OUTPUT);
      pinMode(redLed, OUTPUT);
      pinMode(buzzerPin, OUTPUT);
    }
    
    void loop() {
      // Send the ping and measure the distance
      digitalWrite(trigPin, LOW);
      delayMicroseconds(2);
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
      long time = pulseIn(echoPin, HIGH);
      int distance = time * 0.034 / 2;
    
      if (distance > 40) {
        // FAR AWAY: green light, no beeping
        digitalWrite(greenLed, HIGH);
        digitalWrite(yellowLed, LOW);
        digitalWrite(redLed, LOW);
      }
      else if (distance > 20) {
        // MIDDLE: yellow light, slow beeps
        digitalWrite(greenLed, LOW);
        digitalWrite(yellowLed, HIGH);
        digitalWrite(redLed, LOW);
        tone(buzzerPin, 1000);
        delay(200);
        noTone(buzzerPin);
        delay(400);
      }
      else {
        // VERY CLOSE: red light, fast beeps!
        digitalWrite(greenLed, LOW);
        digitalWrite(yellowLed, LOW);
        digitalWrite(redLed, HIGH);
        tone(buzzerPin, 1000);
        delay(100);
        noTone(buzzerPin);
        delay(100);
      }
      delay(200);
    }

    πŸš€ Test it!

    1. Wire everything like the picture.
    2. Upload the code.
    3. Slowly move your hand toward the sensor. Green β†’ Yellow β†’ RED BEEP BEEP! πŸ–οΈ

    🌟 Try this!

    • Change the 20 and 40 to make it more or less scared of things.
    • Show the distance on the LCD screen too (combine with Project 6!).
    • Attach it to a cardboard car and make a real parking assistant.
    8

    πŸ€– Obstacle-Avoiding Robot

    A robot that drives around β€” and turns away when it finds a wall!

    β˜…β˜…β˜… A bit tricky ⏱️ 45 minutes 🧠 Learn: robots think!
    πŸ›ž Chassis kit (2 motors + wheels) 🟠 L293D motor driver πŸ¦‡ 1 ultrasonic sensor 🦾 1 SG90 servo πŸ”‹ 4xAA battery box 🎚️ Slide switch (optional) 🧡 jumper wires

    πŸ” What you will make

    Your first real robot! It drives forward, and when it sees something close, it stops, looks left, looks right, picks the open side and turns away. Put it on the floor and watch it explore! 🧭

    🧠 How it works

    The servo turns the ultrasonic sensor left and right like a neck. The L293D chip is the muscle that drives the two motors. The brain (Arduino) asks: "Is the way clear?" If yes β†’ GO. If not β†’ look around and turn.

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D8 D11 D12 5V GND D4 D5 D6 D7 5V GND ARM SG90 sig 5V GND HC-SR04 VCC Trig Echo GND Trigβ†’D11 Echoβ†’D12 L293D MOTOR DRIVER IN1 IN2 IN3 IN4 5V GND A1 A2 B1 B2 VM GND D4β†’IN1 D5β†’IN2 D6β†’IN3 D7β†’IN4 5Vβ†’5V GNDβ†’GND MOTOR A MOTOR B BATTERY 4xAA (6V) + βˆ’

    πŸ”Ž Wires may cross in the picture β€” that's fine, they don't actually touch. Follow the table!

    L293D module pinConnect to
    IN1 / IN2D4 / D5 (Arduino)
    IN3 / IN4D6 / D7 (Arduino)
    5V (module)Arduino 5V
    GND (module)Arduino GND + battery βˆ’
    A1, A2 (motor A)Left motor wires
    B1, B2 (motor B)Right motor wires
    VMBattery + (6V)
    Other partsConnect to
    Servo orange / red / brownD8 / 5V / GND
    HC-SR04 VCC / Trig / Echo / GND5V / D11 / D12 / GND
    ⚠️ Keep the L293D module's EN jumpers ON (most modules ship with them on). The battery powers the motors β€” the Arduino 5V only powers the thinking part!

    πŸ’» The Code

    // PROJECT 8: Obstacle Avoiding Robot
    // Drives forward, and turns away when something is in the way!
    
    #include <Servo.h>
    
    Servo lookServo;        // The servo that looks left and right
    
    int in1 = 4, in2 = 5;   // Left motor
    int in3 = 6, in4 = 7;   // Right motor
    int trigPin = 11;
    int echoPin = 12;
    
    void setup() {
      pinMode(in1, OUTPUT); pinMode(in2, OUTPUT);
      pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
      pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);
      lookServo.attach(8);
      lookServo.write(90);        // Look straight ahead
      delay(500);
    }
    
    void loop() {
      int distance = getDistance();
    
      if (distance > 25) {
        driveForward();           // Road is clear - GO!
      } else {
        stopRobot();              // Oops, something is there!
    
        lookServo.write(30);      // Look left
        delay(500);
        int left = getDistance();
    
        lookServo.write(150);     // Look right
        delay(500);
        int right = getDistance();
    
        lookServo.write(90);      // Look straight again
    
        if (left > right) {
          turnLeft();             // More space on the left
        } else {
          turnRight();            // More space on the right
        }
        delay(400);
      }
    }
    
    // ---------- HELPERS ----------
    
    int getDistance() {
      digitalWrite(trigPin, LOW);
      delayMicroseconds(2);
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
      long time = pulseIn(echoPin, HIGH);
      return time * 0.034 / 2;
    }
    
    void driveForward() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
    }
    
    void stopRobot() {
      digitalWrite(in1, LOW); digitalWrite(in2, LOW);
      digitalWrite(in3, LOW); digitalWrite(in4, LOW);
    }
    
    void turnLeft() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);   // Left motor forward
      digitalWrite(in3, LOW);  digitalWrite(in4, HIGH);  // Right motor backward
    }
    
    void turnRight() {
      digitalWrite(in1, LOW);  digitalWrite(in2, HIGH);  // Left motor backward
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);   // Right motor forward
    }

    πŸš€ Test it!

    1. Build the chassis: wheels, motors and battery box (ask a grown-up for the hot glue!).
    2. Wire the L293D, servo and sensor like the picture.
    3. Plug in the battery and the USB cable. Upload the code.
    4. Put the robot on the floor. Make a wall with your hands β€” watch it turn away! 🧱

    🌟 Try this!

    • Change 25 to 10 β€” now it only avoids things right in front of it.
    • Make it turn the other way when space is equal (it likes the left!).
    • Put a small box on top and make it a delivery robot 🚚.
    9

    ⚫ Line-Following Robot

    Draw a black track on paper β€” this robot follows it like a puppy!

    β˜…β˜…β˜… A bit tricky ⏱️ 45 minutes 🧠 Learn: sensors see the line
    πŸ›ž Chassis kit 🟠 L293D motor driver πŸ‘οΈ 2 IR sensors πŸ”‹ 4xAA battery box 🧡 jumper wires

    πŸ” What you will make

    A robot with two "eyes" that look down at the floor. Make a black line (tape or marker), and the robot drives along it, correcting itself left and right so it never loses the track!

    🧠 How it works

    The two IR sensors tell us what's under them: black line or white floor. If the right eye leaves the line, the robot turns right. If the left eye leaves it, it turns left. Both on the line β†’ go straight. It's a tiny "brain" making decisions many times per second!

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D2 D3 D4 D5 D6 D7 5V GND IR LEFT VCC GND OUT IR RIGHT VCC GND OUT 5V GND OUTβ†’D2 OUTβ†’D3 L293D MOTOR DRIVER IN1 IN2 IN3 IN4 5V GND A1 A2 B1 B2 VM GND D4β†’IN1 D5β†’IN2 D6β†’IN3 D7β†’IN4 5Vβ†’5V GNDβ†’GND MOTOR A MOTOR B BATTERY 4xAA (6V) + βˆ’
    PartPinArduino
    IR LEFTVCC / GND / OUT5V / GND / D2
    IR RIGHTVCC / GND / OUT5V / GND / D3
    L293DIN1 / IN2 / IN3 / IN4D4 / D5 / D6 / D7
    L293D5V / GND / VM5V / GND / battery +
    L293DA1, A2 / B1, B2Left / right motor

    πŸ”§ First, tune the sensors!

    Each IR sensor has a small blue knob. Put the sensor on the floor (black line under it) and turn the knob slowly until its little LED goes OFF. Do this before running the robot.

    πŸ’» The Code

    // PROJECT 9: Line Following Robot
    // Two IR eyes keep the robot on the black line!
    
    int leftSensor = 2;     // IR sensor on the LEFT
    int rightSensor = 3;    // IR sensor on the RIGHT
    
    int in1 = 4, in2 = 5;   // Left motor
    int in3 = 6, in4 = 7;   // Right motor
    
    void setup() {
      pinMode(leftSensor, INPUT);
      pinMode(rightSensor, INPUT);
      pinMode(in1, OUTPUT); pinMode(in2, OUTPUT);
      pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
    }
    
    void loop() {
      int left = digitalRead(leftSensor);    // 0 = on the black line
      int right = digitalRead(rightSensor);
    
      if (left == 0 && right == 0) {
        forward();      // Both on the line - GO STRAIGHT!
      }
      else if (left == 0 && right == 1) {
        turnLeft();     // Right eye lost the line - turn LEFT
      }
      else if (left == 1 && right == 0) {
        turnRight();    // Left eye lost the line - turn RIGHT
      }
      else {
        forward();      // Lost the line - keep going straight
      }
    }
    
    void forward() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
    }
    
    void turnLeft() {
      digitalWrite(in1, LOW);  digitalWrite(in2, HIGH);
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
    }
    
    void turnRight() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
      digitalWrite(in3, LOW);  digitalWrite(in4, HIGH);
    }

    πŸ’‘ If the robot zig-zags the wrong way, swap the leftSensor and rightSensor pins (or just swap the two motor plugs).

    πŸš€ Test it!

    1. Build the chassis and wire everything like the picture.
    2. Tune the two IR sensors (see the blue box).
    3. Make a track with black tape or a thick marker on white paper.
    4. Put the robot on the line, add power… and watch it follow! 🐾

    🌟 Try this!

    • Make the track tighter (smaller curves) β€” can your robot handle it?
    • Add a beep when it has to turn.
    • Time it racing around the track β€” beat your own record! ⏱️
    10

    πŸ“± Bluetooth Robot

    Drive your robot from your PHONE β€” no wires, just magic!

    β˜…β˜…β˜… A bit tricky ⏱️ 45 minutes 🧠 Learn: wireless talking
    πŸ›ž Chassis kit 🟠 L293D motor driver πŸ“‘ 1 HC-05 Bluetooth module πŸ”‹ 4xAA battery box 🧡 jumper wires

    πŸ” What you will make

    A robot you drive like a remote-control car β€” but the remote is your phone! Install a free "Bluetooth RC" app, connect, and press F (forward), B (back), L (left), R (right), S (stop).

    🧠 How it works

    The HC-05 is a tiny Bluetooth radio. Your phone sends letters through the air; the HC-05 catches them and passes them to the Arduino. The Arduino reads each letter and tells the motors what to do. We use SoftwareSerial so the radio can talk on pins D2 and D3.

    πŸ”Œ Wire it up

    Arduino UNO USB β†’ computer D2 D3 D4 D5 D6 D7 5V GND HC-05 BLUETOOTH VCC GND TX RX 5V GND TXβ†’D2 RXβ†’D3 L293D MOTOR DRIVER IN1 IN2 IN3 IN4 5V GND A1 A2 B1 B2 VM GND D4β†’IN1 D5β†’IN2 D6β†’IN3 D7β†’IN4 5Vβ†’5V GNDβ†’GND MOTOR A MOTOR B BATTERY 4xAA (6V) + βˆ’
    HC-05 pinArduinoL293DArduino
    VCC / GND5V / GNDIN1 / IN2 / IN3 / IN4D4 / D5 / D6 / D7
    TX / RXD2 / D35V / GND / VM5V / GND / battery +
    A1,A2 β†’ left motor Β· B1,B2 β†’ right motor
    ⚠️ When uploading code to the Arduino, it's safest to unplug the HC-05's RX wire first. Plug it back after the upload finishes.

    πŸ’» The Code

    // PROJECT 10: Bluetooth Robot
    // Phone sends letters: F=forward B=back L=left R=right S=stop
    
    #include <SoftwareSerial.h>
    
    SoftwareSerial bluetooth(2, 3);   // HC-05: TX→pin2, RX→pin3
    
    int in1 = 4, in2 = 5;   // Left motor
    int in3 = 6, in4 = 7;   // Right motor
    char command;           // The letter from your phone
    
    void setup() {
      pinMode(in1, OUTPUT); pinMode(in2, OUTPUT);
      pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
      bluetooth.begin(9600);    // Start talking to the HC-05
      stopRobot();
    }
    
    void loop() {
      if (bluetooth.available()) {      // A letter arrived?
        command = bluetooth.read();     // Read it
    
        if (command == 'F') forward();
        else if (command == 'B') backward();
        else if (command == 'L') turnLeft();
        else if (command == 'R') turnRight();
        else if (command == 'S') stopRobot();
      }
    }
    
    void forward() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
    }
    
    void backward() {
      digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
      digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
    }
    
    void turnLeft() {
      digitalWrite(in1, LOW);  digitalWrite(in2, HIGH);
      digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
    }
    
    void turnRight() {
      digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
      digitalWrite(in3, LOW);  digitalWrite(in4, HIGH);
    }
    
    void stopRobot() {
      digitalWrite(in1, LOW); digitalWrite(in2, LOW);
      digitalWrite(in3, LOW); digitalWrite(in4, LOW);
    }

    πŸš€ Test it!

    1. Wire everything like the picture (HC-05 and module).
    2. Upload the code (with HC-05 RX unplugged, then reconnect it).
    3. On your phone: turn ON Bluetooth. Open a free "Bluetooth RC" / "Arduino Bluetooth Controller" app and connect to "HC-05" (password is usually 1234).
    4. Press the buttons β€” your robot drives! 🏎️

    🌟 Try this!

    • Add your own letters: make 'H' do a happy spin!
    • Add a buzzer that beeps when you send 'B'.
    • Put a cardboard body on it and have a robot race with a friend.
    11

    🚢 Motion-Activated Light

    Walk past and the light turns ON by itself β€” magic? No, PIR!

    β˜…β˜…β˜† Easy ⏱️ 20 minutes 🧠 Learn: sensing movement
    🚢 1 PIR motion sensor ⚑ 1 relay module πŸ’‘ 1 lamp (or LED + resistor to test) 🧱 Breadboard + jumpers

    πŸ” What you will make

    Point the PIR at your door. When someone walks in, the relay switches the lamp ON for 10 seconds, then OFF again. Real buildings use exactly this for hallway lights! (You'll also see the little LED built into the Arduino light up as a sign.)

    🧠 How it works

    The PIR feels the tiny bit of heat (infrared) that people give off. When something warm moves in front of it, its OUT pin goes HIGH. The relay is an electric switch: the Arduino flips it, and the relay turns the big lamp on or off.

    πŸ”Œ Wire it up

    Arduino UNO USB → computer D2 D7 5V GND PIR VCC OUT GND OUT→D2 RELAY module VCC GND IN COM NO 5V IN→D7 LAMP
    PIRArduinoRelayArduino
    VCC / OUT / GND5V / D2 / GNDVCC / GND / IN5V / GND / D7
    Lamp: one wire β†’ relay COM, other wire β†’ relay NO (you can test with an LED + resistor instead)

    πŸ” Relay acting backwards?

    Some relay modules turn ON when the signal is LOW instead of HIGH. If your lamp is on when it should be off (or off when it should be on), just swap HIGH ↔ LOW in the code. The same trick works for Projects 12 and 15!

    πŸ§ͺ Try it safely first

    For your first test, don't use mains power! Use a small LED + resistor or a 6V bulb on the relay's COM/NO. Only a grown-up should ever touch wall electricity.

    πŸ’» The Code

    // PROJECT 11: Motion-Activated Light
    // When someone moves, the light turns ON for 10 seconds!
    
    int pirPin = 2;     // PIR sensor output
    int relayPin = 7;   // Relay switch
    int ledPin = 13;    // Small LED built into the Arduino
    
    void setup() {
      pinMode(pirPin, INPUT);
      pinMode(relayPin, OUTPUT);
      pinMode(ledPin, OUTPUT);
      digitalWrite(relayPin, LOW);   // Light starts OFF
      delay(2000);                   // Give the PIR 2s to wake up!
    }
    
    void loop() {
      int motion = digitalRead(pirPin);   // 1 = movement!
    
      if (motion == HIGH) {
        digitalWrite(relayPin, HIGH);     // Light ON
        digitalWrite(ledPin, HIGH);
        delay(10000);                     // Stay ON for 10 seconds
        digitalWrite(relayPin, LOW);      // Light OFF
        digitalWrite(ledPin, LOW);
      }
    }

    πŸš€ Test it!

    1. Wire the PIR and relay like the picture.
    2. Upload the code and wait 2 seconds (PIR is waking up!).
    3. Wave your hand in front of the PIR β€” the lamp lights up! πŸ‘‹
    4. Stand still for 10 seconds β€” it turns OFF. Move again β€” ON!

    🌟 Try this!

    • Change delay(10000) to delay(30000) β€” light stays on 30 seconds.
    • Add a buzzer on D8 for a "intruder alarm" version.
    • Make a cookie jar alarm β€” hide the PIR and see who sneaks a cookie! πŸͺ
    12

    πŸ‘ Clap Switch

    Clap once… light ON. Clap again… light OFF. Applause required!

    β˜…β˜…β˜† Easy ⏱️ 20 minutes 🧠 Learn: sound sensing + toggling
    🎀 1 sound sensor ⚑ 1 relay module πŸ’‘ 1 lamp (or LED + resistor) 🧱 Breadboard + jumpers

    πŸ” What you will make

    A lamp you switch with a clap! Clap-clap to turn it on, clap-clap to turn it off. You'll feel like a wizard. πŸ§™

    🧠 How it works

    The sound sensor has a tiny microphone. When it hears a loud sound (a clap), its DO (digital out) pin goes HIGH for a moment. The Arduino flips a switch in the code each time: on β†’ off β†’ on β†’ off. That's called toggling.

    πŸ”Œ Wire it up

    Arduino UNO USB → computer D2 D7 5V GND KNOB SOUND VCC GND DO AO DO→D2 RELAY module VCC GND IN COM NO 5V IN→D7 LAMP
    Sound sensorArduinoRelayArduino
    VCC / GND / DO5V / GND / D2VCC / GND / IN5V / GND / D7
    Lamp: one wire β†’ relay COM, other wire β†’ relay NO

    πŸ”§ Tune the sensitivity

    Turn the sound sensor's blue knob to choose how loud a clap must be. Too sensitive β†’ every cough switches it. Too quiet β†’ even shouting won't work!

    πŸ”„ Acts backwards? A few sensors send LOW instead of HIGH when they hear a clap. If the lamp flips when it's quiet, just change HIGH to LOW in the code.

    πŸ’» The Code

    // PROJECT 12: Clap Switch
    // Clap to turn the lamp ON... clap again to turn it OFF!
    
    int soundPin = 2;   // Sound sensor digital output
    int relayPin = 7;   // Relay switch
    int ledPin = 13;    // Arduino's little built-in LED
    
    bool lightOn = false;   // The light starts OFF
    
    void setup() {
      pinMode(soundPin, INPUT);
      pinMode(relayPin, OUTPUT);
      pinMode(ledPin, OUTPUT);
      digitalWrite(relayPin, LOW);
    }
    
    void loop() {
      int sound = digitalRead(soundPin);   // 1 = loud sound (a clap!)
    
      if (sound == HIGH) {
        lightOn = !lightOn;                // Flip the switch!
        digitalWrite(relayPin, lightOn);
        digitalWrite(ledPin, lightOn);
        delay(500);                        // One clap = one switch (not five!)
      }
    }

    πŸš€ Test it!

    1. Wire the sound sensor and relay like the picture.
    2. Upload the code.
    3. Clap near the sensor… the lamp turns ON. πŸ‘βœ¨
    4. Clap again… OFF!

    🌟 Try this!

    • Make a two-clap switch: only turn on after 2 quick claps.
    • Add a buzzer that does a little "ding-dong" when you clap.
    • Use it with a fan or music β€” clap to start your playlist! 🎢
    13

    🌑️ Temperature & Humidity Monitor

    Your own weather station β€” hot or cold, wet or dry?

    β˜…β˜…β˜† Easy ⏱️ 20 minutes 🧠 Learn: reading real-world data
    🌑️ 1 DHT11 sensor πŸ–₯️ 1 I2C LCD display 🧱 Breadboard 🧡 7 jumper wires

    πŸ” What you will make

    A screen that shows the temperature (Β°C) and humidity (how wet the air is, in %) right now. Breathe on the sensor and watch the numbers jump!

    🧠 How it works

    The DHT11 is a little weather scientist. It measures temperature with a tiny thermometer and humidity with a tiny moisture sensor, then sends both to the Arduino on one wire. The library DHT does the tricky reading for us.

    πŸ”Œ Wire it up

    Arduino UNO USB → computer 5V D2 GND A4 A5 DHT11 VCC DATA GND DATA→D2 Temp: 26 C Hum: 55 % LCD 16x2 (I2C) VCC GND SDA SCL 5V SDA→A4 SCL→A5
    DHT11ArduinoLCD I2CArduino
    VCC / DATA / GND5V / D2 / GNDVCC / GND5V / GND
    SDA / SCLA4 / A5

    πŸ“š Libraries you need

    Install LiquidCrystal I2C (like Project 6) and DHT sensor library by Adafruit (Sketch β†’ Include Library β†’ Manage Libraries β†’ search "DHT sensor library" β†’ Install).

    πŸ”Œ Two kinds of DHT11: if yours is the small blue 4-pin module, wire it straight to the board. If it's the bare white 3-pin sensor, also add a 10kΞ© resistor between the DATA pin and 5V (that's called a pull-up β€” it helps the sensor talk).

    πŸ’» The Code

    // PROJECT 13: Temperature & Humidity Monitor
    // Shows temperature and humidity on the LCD!
    
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
    #include <DHT.h>
    
    #define DHTPIN 2          // DHT11 data pin
    #define DHTTYPE DHT11     // Type of sensor
    
    DHT dht(DHTPIN, DHTTYPE);
    LiquidCrystal_I2C lcd(0x27, 16, 2);
    
    void setup() {
      dht.begin();            // Start the weather scientist
      lcd.init();
      lcd.backlight();
    }
    
    void loop() {
      float temp = dht.readTemperature();   // Read temperature in Β°C
      float hum  = dht.readHumidity();      // Read humidity in %
    
      if (isnan(temp) || isnan(hum)) {      // If the reading failed
        lcd.setCursor(0, 0);
        lcd.print("Sensor error!  ");
      } else {
        lcd.setCursor(0, 0);
        lcd.print("Temp: ");
        lcd.print(temp);
        lcd.print(" C   ");
    
        lcd.setCursor(0, 1);
        lcd.print("Hum: ");
        lcd.print(hum);
        lcd.print(" %   ");
      }
    
      delay(2000);    // DHT11 is slow - wait 2 seconds
    }

    πŸ’‘ Screen showing boxes β–―β–―β–―? Try 0x3F instead of 0x27 in lcd(0x27, 16, 2).

    πŸš€ Test it!

    1. Wire the DHT11 and LCD like the picture.
    2. Install both libraries and upload the code.
    3. Watch the screen. Now breathe on the DHT11 β€” humidity shoots up! 🌬️
    4. Put it in the fridge for 1 minute β€” temperature drops!

    🌟 Try this!

    • Add a buzzer that warns when it's hotter than 30Β°C.
    • Show "It's warm πŸ₯΅" or "It's cool ❄️" on the second line.
    • Record the morning vs evening temperature and make a little chart.
    14

    🍷 Alcohol Detector

    A nose that smells alcohol in the air β€” and sounds the alarm!

    β˜…β˜…β˜† Easy ⏱️ 25 minutes 🧠 Learn: analog sensing
    🍷 1 MQ3 gas sensor πŸ”Š 1 buzzer πŸ–₯️ 1 I2C LCD display 🧱 Breadboard + jumpers

    πŸ” What you will make

    A device that smells alcohol and other gases in the air. When the smell is too strong, it shows "ALCOHOL!" on the screen and the buzzer warns: BEEP BEEP! (Real police breathalyzers work on this idea!)

    🧠 How it works

    The MQ3 has a special plate inside that changes its electrical resistance when it smells alcohol. The analogRead() turns that into a number from 0–1023. Bigger number = stronger smell. We compare it to a limit: over the limit β†’ alarm!

    πŸ”Œ Wire it up

    Arduino UNO USB → computer 5V GND A0 A4 A5 D8 MQ3 VCC GND AO DO* AO→A0 Gas: 120 All clear LCD 16x2 (I2C) VCC GND SDA SCL 5V SDA→A4 SCL→A5 BUZZER +→D8

    πŸ”Ž *DO is the digital output β€” we don't use it in this project. The LCD is optional: without it the project still works (the buzzer still alarms!).

    MQ3ArduinoLCD I2CArduino
    VCC / GND / AO5V / GND / A0VCC / GND / SDA / SCL5V / GND / A4 / A5
    Buzzer + / βˆ’D8 / GND
    ⚠️ The MQ3 needs about 30 seconds to warm up before it gives good readings. Never put the sensor near your face β€” just wave it gently near something to smell.

    πŸ’» The Code

    // PROJECT 14: Alcohol Detector
    // Smells alcohol in the air and warns with the buzzer!
    
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
    
    LiquidCrystal_I2C lcd(0x27, 16, 2);
    
    int mq3Pin = A0;        // MQ3 analog output
    int buzzerPin = 8;
    int limit = 300;        // Above this number = ALARM!
    
    void setup() {
      pinMode(buzzerPin, OUTPUT);
      lcd.init();
      lcd.backlight();
      lcd.print("Warming up...");
      delay(30000);         // Let the sensor warm up (30s)
    }
    
    void loop() {
      int value = analogRead(mq3Pin);   // Read the smell level (0-1023)
    
      lcd.setCursor(0, 0);
      lcd.print("Gas: ");
      lcd.print(value);
      lcd.print("    ");
    
      if (value > limit) {
        // STRONG smell - alarm!
        lcd.setCursor(0, 1);
        lcd.print("ALCOHOL! BEEP!  ");
        tone(buzzerPin, 2000);     // Beep! (tone works with any buzzer)
        delay(200);
        noTone(buzzerPin);
        delay(200);
      } else {
        // Air is fine
        lcd.setCursor(0, 1);
        lcd.print("All clear       ");
        delay(500);
      }
    }

    πŸš€ Test it!

    1. Wire the MQ3, buzzer and LCD like the picture.
    2. Upload the code and wait 30 seconds for warm-up.
    3. Wave your hand near the sensor β€” the number stays low.
    4. Now wave it near a bottle of hand sanitizer (it contains alcohol!) β€” the number jumps and the buzzer BEEPS! 🚨

    🌟 Try this!

    • Change limit to make it more or less sensitive.
    • Add a red LED that lights up during the alarm.
    • Make it say "OK" / "SMELLY" β€” your choice of words!
    15

    🏠 Home Automation Switchboard

    Three buttons control a lamp, a fan and a night light β€” your own smart home!

    β˜…β˜…β˜… A bit tricky ⏱️ 30 minutes 🧠 Learn: many things at once
    πŸ”˜ 3 push buttons ⚑ 1 relay module πŸ’‘ 3 LEDs + 3 resistors 🧱 Breadboard + jumpers

    πŸ” What you will make

    A mini smart home! Button 1 turns the lamp (relay) on/off. Button 2 switches the fan (a blue LED). Button 3 switches the night light (a small LED). Press once β†’ ON, press again β†’ OFF.

    🧠 How it works

    Each button toggles (flips) its own thing using bool variables that remember "on" or "off". The relay controls the real lamp; the LEDs show what the fan and night light would be doing. This is how real home automation starts!

    πŸ”Œ Wire it up

    Arduino UNO USB → computer D2 D3 D4 D7 D8 D9 GND 5V LAMP D2 FAN D3 NIGHT D4 RELAY module (lamp) VCC GND IN 5V IN→D7 COM NO LAMP FAN D8 NIGHT D9
    PartPinArduino
    LAMP buttonone leg / other legD2 / GND
    FAN buttonone leg / other legD3 / GND
    NIGHT buttonone leg / other legD4 / GND
    RelayVCC / GND / IN5V / GND / D7
    Fan LED (blue)+ (via resistor) / βˆ’D8 / GND
    Night LED (yellow)+ (via resistor) / βˆ’D9 / GND
    LampCOM / NO on the relayβ€”

    πŸ’» The Code

    // PROJECT 15: Home Automation Switchboard
    // 3 buttons control a lamp (relay), a fan LED and a night LED!
    
    int button1 = 2;   // Lamp button
    int button2 = 3;   // Fan button
    int button3 = 4;   // Night light button
    
    int relayPin = 7;   // Controls the real lamp
    int fanLed = 8;     // Stands for the fan
    int nightLed = 9;   // Night light
    
    bool lampOn = false;
    bool fanOn = false;
    bool nightOn = false;
    
    void setup() {
      pinMode(button1, INPUT_PULLUP);
      pinMode(button2, INPUT_PULLUP);
      pinMode(button3, INPUT_PULLUP);
      pinMode(relayPin, OUTPUT);
      pinMode(fanLed, OUTPUT);
      pinMode(nightLed, OUTPUT);
    }
    
    void loop() {
      if (digitalRead(button1) == LOW) {   // Lamp button pressed?
        lampOn = !lampOn;                  // Flip it!
        digitalWrite(relayPin, lampOn);
        delay(300);                        // So one press = one flip
      }
    
      if (digitalRead(button2) == LOW) {   // Fan button pressed?
        fanOn = !fanOn;
        digitalWrite(fanLed, fanOn);
        delay(300);
      }
    
      if (digitalRead(button3) == LOW) {   // Night light button pressed?
        nightOn = !nightOn;
        digitalWrite(nightLed, nightOn);
        delay(300);
      }
    }

    πŸš€ Test it!

    1. Wire the buttons, relay and LEDs like the picture.
    2. Upload the code.
    3. Press the LAMP button β€” the relay clicks and the lamp turns on!
    4. Press FAN and NIGHT β€” their LEDs light up. Press again β€” everything off!

    🌟 Try this!

    • Add a 4th button that turns everything OFF at once ("goodnight mode" 😴).
    • Make the fan LED blink like a spinning fan when it's on.
    • Combine with the sound sensor: clap to turn on the lamp!

    πŸŽ‰ You did it! You built 15 projects!

    From a blinking LED to robots that avoid walls, follow lines and listen to your phone. That's not "playing with a kit" β€” that's engineering!

    πŸ’‘πŸš¦πŸŽ΅πŸ†˜πŸ¦ΎπŸ“πŸ…ΏοΈπŸ€–βš«πŸ“±πŸšΆπŸ‘πŸŒ‘οΈπŸ·πŸ 

    πŸ”­ What's next?

    • Mix projects together β€” obstacle robot + Bluetooth = a robot you drive that never crashes!
    • Change the numbers β€” speeds, delays, limits. Breaking things to learn is part of the fun.
    • Draw your own invention on paper first, then build it. Every great engineer starts with a sketch.
    • Teach someone else β€” the best way to truly learn something is to explain it to a friend.

    Made with ❀️ for curious young makers Β· Always keep learning, keep building, and keep asking "what if…?"

    ← School science projects for Classes 8-12  |  Arduino project catalogue  |  Project Center Kerala home