0% found this document useful (0 votes)
10 views2 pages

Exp 7

Uploaded by

Krishna RS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Exp 7

Uploaded by

Krishna RS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING


Experiment 7

Student Name: Sagar Rawat UID: 22BCS10832


Branch: CSE Section/Group: 22BCS_639_A
Semester: 5th Date of Performance: 14 -10 -24
Subject Name: IOT LAB Subject Code: 22CSP-329

Aim:

To create a smart door lock system using RFID for secure access control.

Objective:

 Interface multiple actuators with Arduino Uno.


 Control actuators (LED, motor, and buzzer) based on conditions.

Hardware Required:

1. Arduino Uno 5. Resistor (220Ω for LED)


2. LED 6. Transistor & Diode (for motor control)
3. Motor (DC Motor) 7. Jumper Wires
4. Buzzer

CODE

// Pin definitions
const int ledPin = 2;
const int motorPin = 3;
const int buzzerPin = 4;

void setup() {
pinMode(ledPin, OUTPUT);
pinMode(motorPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
}

void loop() {
// Turn on LED, Motor, and Buzzer
digitalWrite(ledPin, HIGH);
digitalWrite(motorPin, HIGH);
digitalWrite(buzzerPin, HIGH);
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
delay(2000); // Wait for 2 seconds

// Turn off LED, Motor, and Buzzer


digitalWrite(ledPin, LOW);
digitalWrite(motorPin, LOW);
digitalWrite(buzzerPin, LOW);
delay(2000); // Wait for 2 seconds
}
Result:

Learning Outcomes:

 Understand how to control basic actuators with Arduino.


 Gain skills in controlling a motor using Arduino pins.
 Learn to use digital I/O for controlling buzzers and LEDs.

You might also like