0% found this document useful (0 votes)
10 views

IOT LAB -Questions Pattern

The document outlines a series of Arduino programming tasks aimed at controlling various hardware components, including RGB LEDs, buttons, buzzers, and sensors. Each task includes a specific objective, required hardware, setup procedures, and the corresponding Arduino code. The tasks cover a range of functionalities, such as reading sensor data, controlling outputs, and implementing user interactions.

Uploaded by

sirisha_cse
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

IOT LAB -Questions Pattern

The document outlines a series of Arduino programming tasks aimed at controlling various hardware components, including RGB LEDs, buttons, buzzers, and sensors. Each task includes a specific objective, required hardware, setup procedures, and the corresponding Arduino code. The tasks cover a range of functionalities, such as reading sensor data, controlling outputs, and implementing user interactions.

Uploaded by

sirisha_cse
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

IoT Arduino Programming

Format:
1. Aim: State the objective of the Arduino program.
2. Hardware Required: List the hardware components needed for the program.
3. Hardware and Software Procedure: Describe the procedure for setting up the hardware
and the software configuration.
4. Arduino Program: Write the complete Arduino program. Ensure the code is well-
commented and functional.
5. Program Execution AND

1. RGB LED Pins (Common Cathode):


• Question: Write an Arduino program to control an RGB LED with a common
cathode configuration. The program should set the LED to display red, green, and
blue colors sequentially with a delay of 1 second between each color.
2. RGB LED Pins (Common Anode):
• Question: Write an Arduino program to control an RGB LED with a common anode
configuration. The program should turn the LED to display red, green, and blue
colors sequentially with a delay of 1 second between each color.
3. Pull-Up Using Button Pin:
• Question: Write an Arduino program to read the state of a button connected to a
digital pin with an internal pull-up resistor enabled. The program should turn on an
LED connected to another pin when the button is pressed.
4. Pull-Down Using Button Pin:
• Question: Write an Arduino program to read the state of a button connected to a
digital pin using an external pull-down resistor. The program should turn on an LED
connected to another pin when the button is pressed.
5. Buzzer:
• Question: Write an Arduino program to control a buzzer connected to a digital pin.
The program should make the buzzer sound a beep for 500 milliseconds, followed by
a 500-millisecond pause, and repeat this pattern continuously.
6. Sliding Switch:
• Question: Write an Arduino program to read the state of a sliding switch connected
to a digital pin. The program should turn on an LED when the switch is in the 'on'
position and turn off the LED when the switch is in the 'off' position.
7. Relay:
• Question: Write an Arduino program to control a relay connected to a digital pin.
The program should turn the relay on and off every 2 seconds, simulating a switching
action.
8. IR Sensor:
• Question: Write an Arduino program to read the data from an IR sensor connected to
an analog pin. The program should print the sensor values to the Serial Monitor
every second.
9. Ultrasonic Sensor:
• Question: Write an Arduino program to measure the distance using an ultrasonic
sensor. The program should send out an ultrasonic pulse, measure the time it takes
for the echo to return, and then calculate and display the distance in centimeters on
the Serial Monitor.
10. DHT11 Temperature and Humidity Sensor:
• Question: Write an Arduino program to read temperature and humidity data from a
DHT11 sensor. The program should print the temperature and humidity values to the
Serial Monitor every 2 seconds.
11. LDR (Light Dependent Resistor):
• Question: Write an Arduino program to read the light intensity from an LDR
connected to an analog pin. The program should print the light intensity value to the
Serial Monitor every second.
12. GAS Sensor:
• Question: Write an Arduino program to read the gas concentration from a gas sensor
connected to an analog pin. The program should print the gas concentration value to
the Serial Monitor every second. The program should turn on an LED when the he
gas concentration value is low and turn off the LED when the gas concentration
value is high .
13. Touch Sensor:
• Question: Write an Arduino program to read the state of a touch sensor connected to
a digital pin. The program should turn on an LED when the touch sensor is activated
and turn off the LED when the sensor is not activated.

You might also like