CO4 QUESTION BANK
Short answer question (2marks)
1. Discuss the features of ESP32.
2. Write some applications of ESP32.
3. List any four features that make the ESP32 a better choice
compared to an Arduino board.
1. Wireless Capabilities: ESP32 has built-in Wi-Fi (802.11 b/g/n)
and Bluetooth (Classic Bluetooth and BLE), making it ideal for
IoT applications without the need for additional modules.
2. Processing Speed: The ESP32 uses a dual-core LX6 processor
running at up to 240 MHz, which is significantly faster than the
typical 16 MHz of standard Arduino boards.
3. Memory: ESP32 provides 520 KB of SRAM, 448 KB of ROM,
and 4 MB of Flash memory, which is substantially more than the
typical 2 KB SRAM, 1 KB EEPROM, and 32 KB Flash memory
on an Arduino Uno.
4. Use Cases: ESP32 is better suited for advanced IoT projects,
wireless communication, and multitasking applications, while
Arduino boards are generally used for simpler sensor-based or
basic automation projects.
4. List the key components required for setting up the ESP32 board in
the Arduino IDE and briefly explain their role in the setup process.
• Arduino IDE: This is the development environment where
you write, compile, and upload code to the ESP32. Ensure
that you have the latest version installed.
• ESP32 Board Manager URL: The board manager URL
(https://dl.espressif.com/dl/package_esp32_index.json) must
be added to the Arduino IDE to enable support for ESP32.
This URL allows the IDE to download the necessary files for
ESP32 board compatibility.
• ESP32 Board Package: Once the board manager URL is
added, you need to install the ESP32 board package from the
Arduino Board Manager. This package includes libraries,
compiler tools, and the hardware definitions necessary to
program ESP32 boards in the Arduino environment.
• USB Cable: A micro-USB cable is required to connect the
ESP32 board to your computer for uploading code and
powering the board. Make sure the cable supports data
transfer, as some cables are power-only.
• COM Port Selection: After connecting the ESP32 to the
computer, you need to select the correct COM port in the
Arduino IDE to communicate with the board. This allows the
IDE to upload the code directly to the ESP32.
5. Explain with an example how GPIO Programming can be done in
ESP32 board
Blink an LED connected to GPIO 2 on the ESP32
// Define the GPIO pin where the LED is connected
#define LED_PIN 2
void setup() {
// Initialize GPIO pin 2 as an output
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// Turn the LED on by setting the pin HIGH
digitalWrite(LED_PIN, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off by setting the pin LOW
digitalWrite(LED_PIN, LOW);
delay(1000); // Wait for 1 second
}
6. Sketch the structure of a cathode ray tube device with its main
components.
7. Classify the display devices that are beneficial for IoT projects.
Few display devices are Cathode ray tube, Light Emitting diodes
(LED), Liquid crystal displays (LCD), Seven-segment displays,
Matrix Display, etc.
8. Draw the 7-segment display for the digits 3 and 6, indicating the
ON and OFF segments.
9. Provide some applications of 7-segment displays.
• Digital clock
• Clock radios
• Calculators
• Wristwatches
• Speedometers
10. Compare the fundamental functionalities of LED and LCD
Displays.
LED LCD
Faster response times; LEDs Slower response times; liquid
light up and turn off instantly crystals take a small amount of
time to adjust
LEDs emit their own light, so Requires a backlight to
they don’t need a backlight illuminate the display
Uses light-emitting diodes to Uses liquid crystals to adjust the
produce light directly light that passes through them.
Typically brighter and visible Generally less bright, limited
from longer distances visibility in direct sunlight
11. What is the full form of LCD? What is the importance of 16x2
LCD.
The full form of LCD is Liquid Crystal Display.
• The 16x2 display has two rows, each capable of displaying up to
16 characters.
• The display can show both alphanumeric characters and
numbers.
• The LCD is available in blue and green backlight options.
• The power consumption is minimal, with a current usage of only
1mA without backlight.
12. Discuss the typical function of the Read/Write pin on an LCD
module.
• Write Mode (R/W = 0):
When the R/W pin is set to 0, the module is in write mode,
meaning the microcontroller sends data or commands to the LCD.
• Read Mode (R/W = 1):
When the R/W pin is set to 1, the module enters read mode,
allowing the microcontroller to read the data or status from the
LCD.
13. What are the benefits of using an IoT system for home automation?
1. Energy Management
2. Home Security
3. Home Control
4. Home Monitoring
5. Home health
14. Specify the purpose of IoT implementation in smart irrigation.
1. Better Crop Management and Increased Crop Yields
2. Optimum growth rate for crops
3. Monitor product conditions in real-time
4. Prediction and making informed decisions
5. Reduced overall water consumption
6. Reduce resources
7. Prevent diseases
8. Preserves soil structure and nutrients
9. Cleaner and more efficient processes
15. Highlight the benefits of IoT in healthcare.
1. Simultaneous Reporting and Monitoring
2. End-to-End Connectivity and Affordability
3. Data Analysis and Assortment
4. Assisting the Elderly
5. Real-Time Tracking and Alerts
6. Check-Up on the Go
Long answer questions
1. Compare the important hardware capabilities of the ESP32 and
Arduino.
2. Explain the principle of common anode & cathode 7-segment
display including its truth table.
Common Anode Display:
• All the anodes (positive terminals) of the LEDs are connected
together and tied to a high voltage (logic 1). To light up a
segment, the corresponding cathode (negative terminal) must
be connected to a low voltage (logic 0 or GND).
• To form a digit, the required segments are turned LOW while
others are kept HIGH.
Common Cathode Display:
• All the cathodes (negative terminals) of the LEDs are
connected together and tied to a low voltage (logic 0 or
ground). To light up a segment, the corresponding anode
(positive terminal) must be connected to a high voltage (logic
1).
• To form a digit, the required segments are turned HIGH while
others are kept LOW.
3. Write a Arduino program to display the message “FIS" on the first
line and “KL University" on the second line of an LCD screen.
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
lcd.setCursor(1,0);
lcd.print("FIS");
lcd.setCursor(2,1);
lcd.print("KL University");
}
4. Draw and explain the pin configuration of a 16x2 LCD.
5. Sketch a diagram that shows connections between 16x2 LCD pins
to a Arduino board without using I2C module.
6. Provide a case study on home automation systems to reduce
environmental impact, particularly concerning energy consumption,
electronic waste, and resource utilization.
7. Write a case study for farmers to effectively transition from
traditional irrigation methods to smart irrigation systems.
8. Discuss the impacts of IoT technologies in healthcare relates to
patient care and potential applications.