1) IR / LDR sensor to turn ON LED Apparatus: Arduino Uno board IR sensor module or LDR module LED 220 Ω resistor for LED Breadboard Jumper wires Connections: IR/LDR sensor: VCC → 5 V on Arduino GND → GND on Arduino OUT → Digital pin 2 on Arduino LED: Anode → Digital pin 13 on Arduino Cathode → GND via 220 Ω resistor Program : const int ledPin = 13; const int IRSensorPin = 2; void setup() { pinMode(ledPin, OUTPUT); pinMode(IRSensorPin, INPUT); Serial.begin(9600); }void loop() { int sensorState = digitalRead(IRSensorPin); if (sensorState == LOW) { digitalWrite(ledPin, HIGH); Serial.println("Object Detected"); } else { digitalWrite(ledPin, LOW); Serial.println("No obstacle"); }delay(2000); } 2) I2C LCD displaywith Arduino Apparatus: Arduino Uno board 16 2 (or 20 4 I2C LCD module Jumper wires Connections: LCD I2C pins to Arduino: GND → GND VCC → 5 V SDA → A4 Arduino Uno SDA SCL → A5 Arduino Uno SCL Program: #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); void setup() { lcd.init(); lcd.backlight(); lcd.setCursor(3, 0); lcd.print("Hello, World!"); lcd.setCursor(0, 1); lcd.print("Yal robot Arduino!"); lcd.setCursor(0,2); lcd.print("Arduino LCMIIC 2004"); lcd.setCursor(2,3); lcd.print("Powred by FC - yuan"); }void loop() {} 3) DHT11 temperature and humidity with Arduino Apparatus: Arduino Uno board DHT11 temperature and humidity sensor module Jumper wires Connections: DHT11 sensor: 1VCC → 5 V on Arduino GND → GND on Arduino DATA → Digital pin 2 on Arduino Program #include "DHT.h" #define DHTPIN 2 #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(9600); Serial.println(F("DHT11 test!")); dht.begin(); }void loop() { delay(2000); float h = dht.readHumidity(); float t = dht.readTemperature(); float f = dht.readTemperature(true); if (isnan(h) || isnan(t) || isnan(f)) { Serial.println(F("Failed to read from DHT sensor!")); return; }float hif = dht.computeHeatIndex(f, h); float hic = dht.computeHeatIndex(t, h, false); Serial.print(F("Humidity: ")); Serial.print(h); Serial.print(F("% Temperature: ")); Serial.print(t); Serial.print(F("°C ")); Serial.print(f); Serial.print(F("°F Heat index: ")); Serial.print(hic); Serial.println(F("°C")); Serial.print("hif"); Serial.print(F("F")); } 4) Motor control using relay and push button Apparatus: Arduino Uno board 1 - channel relay module DC motor Push button External DC supply for motor (if needed) Diode across motor (if using bare relay + motor) Jumper wires, breadboard Connections: Relay:1 VCC → 5 V on Arduino GND → GND on Arduino IN → Digital pin 7 on Arduino Push button: One side → 5 V Other side → Digital pin 2 on Arduino (with internal or external pull - down/pull - up) Motor via relay contacts: Relay COM → external supply + Relay NO → motor + Motor - → external supply − Program #include<Servo.h> const int servoPin=9; const int buttonPin = 2; const int relayPin = 3; Servo myServo; int servoPosition=0; int buttonState=0; int lastButtonState = HIGH; void setup() { myServo.attach(servoPin); myServo.write(0); pinMode(buttonPin,INPUT_PULLUP); pinMode(relayPin,OUTPUT); digitalWrite(relayPin,LOW); }void loop() { buttonState = digitalRead(buttonPin); if(button_State ==LOW && lastButtonState==HIGH){ if(digitalRead(relayPin)==LOW){ digitalWrite(relayPin,HIGH); for(ServoPosition=0;servoPosition<=180;servoP osition++){ myServo.write(servoPosition); delay(15); } }else{ digitalWrite(relayPin,LOW); for(servoPosition = 180;servoPosition >=0;servoPosition -- ){ myServo.write(servoPosition); delay(15); }}} delay(100); } 5) Bluetooth controlling LED Apparatus Arduino Uno board HC 05 Bluetooth module LED 220 Ω resistor for LED Jumper wires, breadboard Connections HC - 05 1 :{ VCC →5V on Arduino GND → GND on Arduino TXD →Arduino RX pin (e.g., pin 10 if using SoftwareSerial or RX0 if using hardware Serial) RXD →Arduino TX pin via voltage divider 5 V → 3.3 V LED Anode →Digital pin 13 (or 7 as per your record)1 Cathode →GND via 220 Ω resistor } Program (simple version using Serial) #include<SoftwareSerial.h> SoftwareSerialBT(10,11); #define Led_pin 13 void setup(){ Pinmode(LED_PIN,OUTPUT); BT_begin(9600); Serial.begin(9600); Serial.println(“Bluetooth LEDcontrolStarted”); Void loop(){ if(BT.available()){ Char data=BT.read(); Serial.println(data); if(data==’1’){ digitalWrite(LED_PIN,HIGH); Serial.println(“LED ON”); }else if(data==’0’){ digitalWrite(LED_PIN,LOW); Serial.println(“LED OFF”); }}} 6) Flame sensor Apparatus Arduino Uno board Flame sensor (analog) module MQ series gas/smoke sensor module Red LED Green LED Buzzer Jumper wires 1 Connections – Flame sensor (analog) Flame sensor: VCC → 5 V GND → GND AO →A0 on Arduino1 Program – Flame sensor (corrected) int flamePin=4; int buzzerPin=13; int flameValue=0; void setup() { pinMode(flamePin,INPUT); tone(buzzerPin,1000,200); Serial.begin(9600); }void loop() { flameValue=digitalRead(flamePin); if(flameValue==HIGH){ digitalWrite(buzzerPin,HIGH); Serial.println("Flame detected"); }else{ Serial.println("No flame!"); noTone(buzzerPin); } delay(100);} 7) Gas Connections – Gas/smoke sensor Gas sensor: VCC → 5 V GND → GND AO → A5 on Arduino Indicators: Red LED anode → pin 12 via 220 Ω resistor, cathode → GND Green LED anode → pin 11 via 220 Ω resistor, cathode →GND Buzzer + →pin 10, buzzer − → GND1 Program – Gas/smoke sensor int redLed =12; int greenLed =11; int buzzer =10; int smokeA0 =A5; int sensorThres = 300; void setup() { pinMode(redLed, OUTPUT); pinMode(greenLed, OUTPUT); pinMode(buzzer, OUTPUT); pinMode(smokeA0, INPUT); Serial.begin(9600); }void loop() { int analogSensor = analogRead(smokeA0); Serial.print("Pin A5: "); Serial.println(analogSensor); if (analogSensor > sensorThres) { digitalWrite(redLed, HIGH); digitalWrite(greenLed, LOW); tone(buzzer, 2000, 200); } else { digitalWrite(redLed, LOW); digitalWrite(greenLed, HIGH); noTone(buzzer); }delay(1000); } 9) Moisture / rainfall sensor with LED alert Apparatus Arduino Uno board Soil moisture / rainfall sensor module with supporting board LED 220 Ω resistor (if needed) Jumper wires, breadboard Connections 1Moisture sensor supporting IC board: VCC → 5 V on Arduino GND → GND on Arduino AO → A0 on Arduino DO →can be used as digital output (optional) LED Anode → pin 6 via 220 Ω resistor Cathode → GND1 Program (corrected) #define ledPin 6 #define sensorPin A0 int readSensor() { int sensorValue = analogRead(sensorPin); / / 0 – 1023 int outputValue = map(sensorValue, 0, 1023, 255, 0); // invert for LED analogWrite(ledPin, outputValue); return outputValue; }void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); digitalWrite(ledPin, LOW); }void loop() { Serial.print("Analog output: "); Serial.println(readSensor()); delay(500); } 8) Relaywith LED Apparatus Arduino Uno board 1 - channel relay module 5 V coil) LED (indicator) 220 Ω resistor for LED Breadboard Jumper wires USB cable for Arduino External load (lamp/motor) and its power supply Connections Relay side: Relay VCC → 5 V on Arduino Relay GND → GND on Arduino Relay IN (control pin) →Arduino digital pin 7 LED side: LED anode (+) → Arduino digital pin 12 LED cathode (−) →GND through 220 Ω resistor Optional load via relay contacts): Relay COM →external supply + Relay NO →load + terminal Load − terminal →external supply − Program : int relayPin = 7; int ledPin = 12; void setup() { pinMode(relayPin, OUTPUT); pinMode(ledPin, OUTPUT); digitalWrite(ledPin, HIGH); }void loop() { digitalWrite(relayPin, HIGH); delay(2000); digitalWrite(relayPin, LOW); delay(2000);} 10) LED blinking Apparatus Arduino Uno board USB cable for Arduino Optional) External LED 220 Ω resistor + breadboard + jumper wires Connections Built in LED (no external wiring): Arduino pin 13 → onboard LED LED_BUILTIN Optional external LED LED anode (+) → Arduino digital pin 13 LED cathode (−) → GND through 220 Ω resistor Program: void setup() { pinMode(LED_BUILTIN, OUTPUT); }void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000);}