Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1.

Write a program to count the number of people entering a room, the count should be
displayed on the serial window. The count should stop when the value reaches 10 and show
the massage “ROOM FULL”.
2. Write a program to measure the distance of an object from a given location. Whenever the
distance is less than 8cm a LED should turn ON. Whenever distance is less than 4cm 2 two
LEDs should turn ON. When no object is detected both LEDs should keep blinking.
3. Write a program which will control the intensity of brightness of a LED based on the amount
of light falling on LDR. Also connect another LED which will blink continuously as long as the
LDR is kept in dark.
4. A gas sensor is installed in a room to ensure the quality of air is managed. Whenever the
amount of gas being sensed is very LOW a green LED should turn on. If the amount of gas in
the room is above a limit for more than 20 seconds continuously then a yellow LED should
turn ON, if the amount of gas in the room is above a limit for more then a minute two red
LEDs should blink continuously till the level goes below the limit for 30 seconds.
5. Use two IR sensors to detect entry and exit people from the room. A counter should increment
when a person enters the room and it should decrement when a person exits the room. The
count should be displayed on the serial monitor.
6. Write a program which will turn on an LED whenever a continuous motion for more than 20
seconds is detected around the PIR sensor. If the motion is for less than 30 seconds the LED
should not turn ON.
7. A rainfall sensor is detecting the amount of rain falling. Use a two LED binary code to show
the following conditions

No rain 0 0

Light Rain 0 1

Heavy Rain 1 0

8. Use three LEDs and a IR sensor to show the count of people entering a room in binary. For
example one person enters the count should be 001, second person enters the count should
be 010 .
9. Use a temperature sensor to show the following conditions of temperature

Low 0 0

Medium 0 1

HIgh 1 0

Very HIgh 1 1

10. Count the number of claps sensed by the clap sensor. Every clap detected should be displayed
as a count on the serial window. If 10 or more claps are detected a message should be
displayed as “THAT IS ENOUGH”.
11. Write a program to detect if an object is present in front of the sensor at a distance of less
than 10 cm for more than one minute continuously. If yes, it should display a message “PLEASE
MOVE”.
12. Write a program to control the brightness of an LED based on the distance of an object from
the sensor. Closer the object, brighter the LED should glow.
13. Write a program to control the brightness of an LED based on the soil humidity. Higher the
humidity, brighter the LED should glow.
14. Write a program to control the brightness of an LED based on temperature. Higher the
temperature, brighter the LED should glow.
15. Write a program to compare the output of two Piezoelectric generators. An LED should turn
ON when both the Piezoelectric generators generate the same voltage.

You might also like