Your first five projects
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
- Connect the LDR and 10 kΩ resistor in a line between 5V and GND; join their middle point to pin A0.
- Connect the LED and 220 Ω resistor from pin 13 to GND.
- Upload the night-lamp code from Chapter 7.
- 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
- PIR pins: VCC to 5V, GND to GND, OUT to pin 2.
- Buzzer to pin 8, LED (with resistor) to pin 13.
- Code idea: if pin 2 is HIGH, then turn on the buzzer and LED for 3 seconds.
- 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
- Sensor: VCC to 5V, GND to GND, AOUT to A0.
- Read the number with the sensor in dry soil, then in wet soil.
- Code idea: if the reading says "dry", then beep twice every minute.
- 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
- Ultrasonic: VCC to 5V, GND to GND, TRIG to pin 9, ECHO to pin 10.
- Servo: brown to GND, red to 5V, orange to pin 6.
- 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°.
- 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
- Create a Blynk account and a new device template.
- Connect the LED and resistor from GPIO 2 to GND (many ESP32 boards also have a built-in LED on GPIO 2).
- Upload Blynk's example code with your WiFi name, password and Blynk details filled in.
- 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.