0% found this document useful (0 votes)
9 views10 pages

IOT (2)

The document outlines various experiments conducted using Arduino, including programs for blinking an LED, controlling a buzzer, using an LDR, and an IR sensor. Each experiment details the hardware and software requirements, procedures for setup, and the corresponding Arduino code. The results and conclusions confirm the successful implementation of each project.

Uploaded by

sruthi kunam
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)
9 views10 pages

IOT (2)

The document outlines various experiments conducted using Arduino, including programs for blinking an LED, controlling a buzzer, using an LDR, and an IR sensor. Each experiment details the hardware and software requirements, procedures for setup, and the corresponding Arduino code. The results and conclusions confirm the successful implementation of each project.

Uploaded by

sruthi kunam
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/ 10

WEEK-1

EXP: 1B. Write Program Using Arduino IDE For Blink LED.
NAME: c.poojitha DATE:06-12-2024
H.NO: 22EG106B34 P.NO: 1

AIM: Program for Blink LED using Arduino.

HARDWARE REQUIREMENTS:

● Arduino Uno Board

● LED Module

● Jumper Wires

SOFTWARE REQUIREMENTS:

● Arduino IDE

PROCEDURE:

● Connect the common (cathode-) pin of the LED module to GND (0V) on the
AConnect the common (anode+) pin of the LED module to 5V on the Arduino.

●Connect the pin of LED bulb to 3 of Digital PWM on the Arduino since we given 3 in
Program for output.

●Using USB wire connect the system and Arduino. Enter the program in Arduino IDE
software followed by compile and upload it to Arduino. Note that the selected board
is Arduino UNO and port is connected.

PROGRAM:
void setup() {

// initialize digital pin LED_BUILTIN as an output.

pinMode(3, OUTPUT);

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


P.NO: 2

void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on


(HIGH is the voltage level) delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW

delay(1000); // wait for a second

RESULT:

CONCLUSION:
Blink LED using Arduino has been implemented.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


WEEK-2
EXP: 2A. Write Program For Buzzer Using Arduino.
NAME:c.poojitha DATE:06-12-2024
H.NO: 22EG106B34 P.NO: 3

AIM: Program for Buzzer using Arduino.

HARDWARE REQUIREMENTS:

● Arduino Uno Board

● Buzzer

● Jumper Wires

SOFTWARE REQUIREMENTS:

● Arduino IDE PROCEDURE:

● Connect the common (cathode-) pin of the Buzzer to GND (0V) on the Arduino.

● Connect the common (anode+) pin of the Buzzer 3 of Digital PWM on the Arduino
since we given 3 in program for output.

●Using USB wire connect the system and Arduino. Enter the program in Arduino IDE
software followed by compile and upload it to Arduino. Note that the selected board
is Arduino UNO and port is connected.

●We can listen sound of buzzer for 10 seconds continuously with 5 seconds gap.

PROGRAM:

const int buzz=3; void


setup() {
pinMode(buzz,OUTPUT);

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


P.NO: 4

void loop() { digitalWrite(buzz,HIGH);

delay(10000); //Buzzer sounds for 10 seconds

digitalWrite(buzz,LOW);

delay(5000); //Buzzer waits for 5 seconds


}

RESULT:

CONCLUSION:
Buzzer using Arduino has been implemented.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


WEEK-2
EXP: 2B. Write Program For LDR Using Arduino.
NAME: c.poojitha DATE:06-12-2024
Error! Bookmark not defined.
H.NO: 22EG106B34 P.NO:5

AIM: Program for LDR using Arduino.

HARDWARE REQUIREMENTS:

● Arduino Uno Board

● LDR

●LED Module

● Jumper Wires

SOFTWARE REQUIREMENTS:

● Arduino IDE

PROCEDURE:

● Connect the common (cathode-) pin of the LED module to GND (0V) on the Arduino.

● Connect the common (anode+) pin of the LED module to 2 of Digital PWM on the
Arduino since we given 2 in program for output.
●Connect the A0 of LDR to A0 of ‘Analog in’ on the Arduino.

●Connect the GND of LDR to GND on the Arduino.

●Connect the VCC of LDR to 5V on the Arduino.

●Using USB wire connect the system and Arduino. Enter the program in Arduino IDE
software followed by compile and upload it to Arduino. Note that the selected board
is Arduino UNO and port is connected.

●Whenever there is darkness the bulb glows brightly and whenever there is lighting
bulb does not glow. It is used in smart homes.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


P.NO: 6

PROGRAM:

int LDRInput=A0;
int LED=2;

void setup() {
Serial.begin(9600);

pinMode(LDRInput,INPUT);

pinMode(LED,OUTPUT);
}

void loop() { int

value=analogRead(LDRInput);

Serial.println("LDR value is:");


Serial.println(value);
if(value<300)
{

digitalWrite(LED,LOW); //Bulb does not glow

else

digitalWrite(LED,HIGH); //Bulb glows brightly

}
}

RESULT:

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


P.NO:7

CONCLUSION:
LDR using Arduino has been implemented.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


WEEK-2
EXP: 2C. Write Program For IR Sensor Using Arduino.
NAME: c.poojitha DATE:06-12-2024
H.NO: 22EG106B34 P.NO: 8

AIM: Program for IR Sensor using Arduino.

HARDWARE REQUIREMENTS:

● Arduino Uno Board

● IR Sensor

●LED Module
● Jumper Wires

SOFTWARE REQUIREMENTS:

● Arduino IDE

PROCEDURE:

● Connect the common (cathode-) pin of the LED module to GND (0V) on the Arduino.

● Connect the common (anode+) pin of the LED module to 13 of Digital PWM on the
Arduino since we given 13 in program for output.
●Connect the OUT of IR Sensor to 9 of Digital PWM on the Arduino.

●Connect the GND of IR Sensor to GND on the Arduino.


●Connect the VCC of IR Sensor to 5V on the Arduino.

●Using USB wire connect the system and Arduino. Enter the program in Arduino IDE
software followed by compile and upload it to Arduino. Note that the selected board
is Arduino UNO and port is connected.

●Whenever an object/hand comes near in front of the sensor, bulb glows brightly else
the bulb does not glow. It is used in detecting objects.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


P.NO: 9

PROGRAM:

int IRSensor=9;

int LED=13;

void setup() {
Serial.begin(115200);

Serial.println("Serial working");
pinMode(IRSensor,INPUT);
pinMode(LED,OUTPUT);
}

void loop() { int

sensorStatus=digitalRead(IRSensor);

if(sensorStatus==1)

{
digitalWrite(LED,LOW);

Serial.println("Motion detected");

}
else

digitalWrite(LED,HIGH);
Serial.println("Motion Ended!");

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI


RESULT: P.NO: 10

CONCLUSION:
IR Sensor using Arduino has been implemented.

ANURAG UNIVERSITY IOT LAB DEPARTMENT OF AI

You might also like