0% found this document useful (0 votes)
19 views39 pages

Material 4

The document describes using sensors like temperature, light, and push buttons to control LEDs, buzzers, and servos. It provides instructions to write programs to monitor sensor values and trigger outputs like warnings or system ready messages.

Uploaded by

Dina Alostath
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)
19 views39 pages

Material 4

The document describes using sensors like temperature, light, and push buttons to control LEDs, buzzers, and servos. It provides instructions to write programs to monitor sensor values and trigger outputs like warnings or system ready messages.

Uploaded by

Dina Alostath
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/ 39

The sensitivity of LM35 and TMP36 are 10 mV/degree Celsius. As temperature increases, output voltage also increases.

Write a program that satisfies the following conditions:

• Use 3 LEDs and Temperature.

• All lights are off if the temperature is below 30 °.

• Only one LED lights up if the temperature is between


30 ° and 50 °.

• Two LEDs light up if the temperature is between 51 °


and 70 °.

• All LEDs light up if the temperature is more than 70 °.


LDR ( Light Dependent Resistor )
The LDR is a special type of resistor that allows higher voltages to pass through it
(low resistance) whenever there is a high intensity of light, and passes a low voltage
(high resistance) whenever it is dark.

The resistance of an LDR is inversely proportional to


the intensity of light that falls on the LDR's surface.
In other words, with an increase in light intensity,
the resistance of photoresistor or LDR decreases.
Applications of LDR:
There are some applications of LDR which are given below.

• The LDR is used in infrared astronomy.


• The LDR used in smoke detectors.
• It is used for automatic contrast and brightness control in television
receivers.
Cadmium
• It is used in street light control circuits.
Sulfide
• It is used in camera light meters.
• It is used in the security alarm.
Write a program that satisfies the following
conditions:

• Use 2LEDs and LDR.

• The LED1 lights up if LDR value is less


than 300.

• The LED2 lights up if LDR value is greater


than 600.
Write a program that satisfies the following conditions:

• Use LED, Buzzer, Temperature, Pushbutton, and LDR.

• if the temperature is greater than 60 ° C or the light


intensity is greater than 350, issue a warning by lighting up
the LED and an Intermittent Beep Sound from the Buzzer
and print the word "Warning" on the Serial Monitor.

• If the temperature is less than 25 ° C and the light intensity


is less than 85, and if the Push button is pressed, print
"System Ready“ on the Serial Monitor.
It is used to control the
operation and direction
of rotation and speed of
the DC motor.
Arduino
V in

9v
3 A 5 6 B 10
9;
10 ;
• It is used to control the angle of rotation.

• It can move at 180 angles, and in some

types at 360.

• It is used in robotic arms and toys.


Write a program that satisfies the following conditions:

• Use ( for loop ) to move the servo motor , so it is

turned 180 at high speed and then returned to the

starting angle at low speed.

You might also like