Rapid-fire viva questions
Short questions an examiner can fire at you, across all eight experiments. Answer out loud first, then open the answer.
Numbers to know cold
| Thing | Value | Where |
|---|---|---|
| LED resistor, current | 220 Ω, about 13.6 mA | Exp 1, 2 |
| Pull-down resistor | 10 kΩ | Exp 1 |
| Arduino ADC | 10-bit, 0 to 1023, about 4.9 mV per step | Exp 2 |
| ESP32 ADC | 12-bit, 0 to 4095 | Exp 3, 4 |
| PWM range, frequency | 0 to 255, about 490 Hz | Exp 2 |
| HC-SR04 | 40 kHz, 10 µs trigger, 2 to 400 cm, 0.0343 cm/µs | Exp 2 |
| Servo signal | 50 Hz (20 ms), 544 to 2400 µs in ESP32Servo | Exp 3 |
| DHT22 | 0 to 100 %RH, −40 to 80 °C, every 2 s, 40 bits | Exp 4 |
| Bluetooth Classic | 2.4 GHz, 79 channels, 1600 hops/s, 1 master + 7 slaves | Exp 5 |
| HTTP | port 80, 200 OK, blank line ends the headers | Exp 6 |
| GSM | Ctrl+Z = byte 26, peaks about 2 A, +CREG: 0,1 = registered | Exp 7 |
| Baud rates | 9600 on Arduino sketches, 115200 on most ESP32 sketches | all |
Mixed questions
Quick fire
Why is pin 13 special on the UNO?
It is wired to the on-board LED, LED_BUILTIN.
What does Serial.available() return?
The number of received bytes waiting in the buffer.
Active or passive buzzer for a melody?
Passive, driven with tone(). An active buzzer has one fixed pitch.
Which function measures the echo pulse?
pulseIn(echoPin, HIGH), in microseconds.
What does map(163, 0, 1023, 0, 255) return?
40 (40.6, with the fraction dropped).
What library drives a servo on ESP32?
ESP32Servo, which uses the LEDC PWM peripheral.
What are NO and NC?
Normally open and normally closed relay contacts.
What does isnan() protect against?
Using a failed DHT reading, returned as NaN.
What is DO on the LDR module?
The LM393 comparator’s digital output: bright or dark relative to the trimmer setting.
What profile does Bluetooth serial use?
SPP, the Serial Port Profile, over RFCOMM.
What does WL_CONNECTED mean?
The ESP32 has joined the Wi-Fi network.
How does the web server know the request ended?
An empty line after the headers.
AT command for SMS text mode?
AT+CMGF=1.
Why SoftwareSerial on the Uno?
The single hardware UART is used by USB for the PC.
What must loop() call in Arduino Cloud sketches?
ArduinoCloud.update().
What protocol does Arduino IoT Cloud use?
MQTT over TLS.
One step further
Name a blocking function in your code and its cost.
delay(). While it runs, nothing else happens: no sensor reading, no serial handling. pulseIn() also blocks until the echo ends or times out.
Where in your code is integer division a trap?
Ultrasonic: duration / 2 is integer division, and storing the result in int distance drops the decimals. map() also uses integer maths.
Which experiments would break on 5 V logic?
Anything wiring 5 V signals into the ESP32 (Exp 3 to 8) without a divider, since ESP32 pins are 3.3 V.
How do the four wireless methods compare for range?
Bluetooth about 10 m, Wi-Fi one building, GSM anywhere with 2G coverage, cloud anywhere with internet.
Compare and contrast
| Pair | The difference in one line |
|---|---|
| digitalWrite vs analogWrite | two levels vs PWM duty 0 to 255 |
| digitalRead vs analogRead | HIGH/LOW vs 0 to 1023 (ESP32: 0 to 4095) |
| pull-up vs pull-down | idle HIGH, press pulls LOW vs idle LOW, press pulls HIGH |
| servo vs DC motor | holds an angle with feedback vs just spins |
| relay vs transistor | isolated mechanical switch, slow vs electronic switch, fast, not isolated |
| DHT22 vs DHT11 | wider range, ±0.5 °C, 2 s vs narrower, ±2 °C, 1 s |
| Bluetooth vs Wi-Fi | paired point-to-point, short range vs networked, reachable by IP address |
| HTTP vs MQTT | request-response, client asks vs publish-subscribe through a broker, pushed |
| Station vs access point | joins a router vs is the network |
How to answer well
- Lead with the one-line answer, then one reason: “It’s a pull-down, so the pin reads LOW when the button is open.”
- Point at your code, for example: on line 10,
pinMode(buttonPin, INPUT)makes the button pin an input. - Use the numbers: 220 Ω, 13.6 mA, 1023, 255, 0.0343, 50 Hz, 2 s, port 80, byte 26.
- Know your quirks before they are found: the LED that stays on after the button, the buzzer pin without
pinModein the ultrasonic code, the LDR LED lighting in bright light, the board in the GSM photo. - If you do not know, say what you would check: the datasheet, the Serial Monitor output, or a quick test.