EngorioEngorio.in
Chapter 10

Your first five projects

3 min read5 sections

Start with project 1 and work your way up. Each one follows the same pattern: sense → think → act, and the last one adds share.

# Project Level Sense Act
1 Automatic night lamp Easy Light sensor (LDR) LED turns on
2 Intruder alarm Easy Motion sensor (PIR) Buzzer and red LED
3 Thirsty-plant alarm Medium Soil moisture sensor Buzzer beeps
4 Smart dustbin Medium Ultrasonic sensor Servo opens the lid
5 Phone-controlled light Hard Your phone (app button) LED turns on through WiFi

Project 1: Automatic night lamp

You need
  • Arduino Uno
  • LDR
  • 10 kΩ resistor
  • LED
  • 220 Ω resistor
  • wires
  • breadboard
  1. Connect the LDR and 10 kΩ resistor in a line between 5V and GND; join their middle point to pin A0.
  2. Connect the LED and 220 Ω resistor from pin 13 to GND.
  3. Upload the night-lamp code from Chapter 7.
  4. Cover the LDR with your hand. The LED should switch on!

Project 2: Intruder alarm

You need
  • Arduino Uno
  • PIR sensor
  • buzzer
  • red LED
  • 220 Ω resistor
  1. PIR pins: VCC to 5V, GND to GND, OUT to pin 2.
  2. Buzzer to pin 8, LED (with resistor) to pin 13.
  3. Code idea: if pin 2 is HIGH, then turn on the buzzer and LED for 3 seconds.
  4. Wait one minute after powering on; the PIR needs time to settle.

Project 3: Thirsty-plant alarm

You need
  • Arduino Uno
  • capacitive soil moisture sensor
  • buzzer
  1. Sensor: VCC to 5V, GND to GND, AOUT to A0.
  2. Read the number with the sensor in dry soil, then in wet soil.
  3. Code idea: if the reading says "dry", then beep twice every minute.
  4. Level up: later, add a relay and a small pump so the plant waters itself.

Project 4: Smart dustbin

You need
  • Arduino Uno
  • HC-SR04 ultrasonic sensor
  • SG90 servo
  • a small bin
  1. Ultrasonic: VCC to 5V, GND to GND, TRIG to pin 9, ECHO to pin 10.
  2. Servo: brown to GND, red to 5V, orange to pin 6.
  3. Code idea: if a hand is closer than 20 cm, then turn the servo to 90° (lid open), wait 3 seconds, then back to 0°.
  4. Tape the servo arm to the lid and the sensor to the front of the bin.

Project 5: Phone-controlled light

You need
  • ESP32 board
  • LED
  • 220 Ω resistor
  • a phone with the Blynk app
  • home WiFi
  1. Create a Blynk account and a new device template.
  2. Connect the LED and resistor from GPIO 2 to GND (many ESP32 boards also have a built-in LED on GPIO 2).
  3. Upload Blynk's example code with your WiFi name, password and Blynk details filled in.
  4. Add a button in the app linked to the LED. Tap it, and your light turns on through the internet!

Congratulations: project 5 is a real IoT device. It senses your command, thinks, acts and shares over the internet.