SENSORS (QUIZ 2)

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards
  1. Which pin on the ESP32 development board provides the raw input voltage (typically 5V from USB)?

    a) 3V3
    b) EN
    c) VIN
    d) GND

c) VIN

2
New cards
  1. What is the maximum voltage that can be safely applied to any GPIO pin on the ESP32?

    a) 3.3 V
    b) 5 V
    c) 1.8 V
    d) 12 V

a) 3.3 V

3
New cards
  1. How many ADC (analog-to-digital converter) channels are available on the standard 30-pin ESP32 board?

    a) 4
    b) 8
    c) 12
    d) 18

c) 12

4
New cards
  1. Which pair of pins is the default I2C interface on the ESP32?

    a) IO21 (SDA) & IO22 (SCL)
    b) IO18 (SDA) & IO19 (SCL)
    c) IO2 (SDA) & IO15 (SCL)
    d) IO32 (SDA) & IO33 (SCL)

a) IO21 (SDA) & IO22 (SCL)

5
New cards
  1. What is the maximum continuous current sourcing capability per GPIO pin on the ESP32?

    a) 5 mA
    b) 40 mA
    c) 20 mA
    d) 12 mA

d) 12 mA

6
New cards
  1. Which object represents the embedded HTTP server instance?

    a) Wi-Fi
    b) WebServer
    c) HTTPClient
    d) DHT

b) WebServer

7
New cards
  1. What role does server.handleClient() play in the loop() function?

    a) It restarts the web server periodically
    b) It reads sensor data asynchronously
    c) It updates the Wi-Fi connection status
    d) It processes any incoming HTTP requests

d) It processes any incoming HTTP requests

8
New cards
  1. Which function initialize communication with the DHT11 sensor?

    a) Serial.begin()
    b) dht.begin()
    c) WiFi.softAP()
    d) server.begin()

b) dht.begin()

9
New cards
  1. Which step is essential to establish internet connectivity before and cloud operations?

    a) Connecting to the Wi-Fi network
    b) Initializing the sensor library
    c) Setting up the real-time clock
    d) Configuring GPIO pins

a) Connecting to the Wi-Fi network

10
New cards
  1. How does the code avoid toggling the relay unnecessarily?

    a) By reading the relay pin stat directly each loop
    b) By using a hardware debouncer circuit
    c) By comparing the desired status against the previous status
    d) By disabling the relay after each activation

c) By comparing the desired status against the previous status

11
New cards
  1. Why is a timed interval (e.g., every 10 seconds) used before reading the sensor again?

    a) To avoid flooding the cloud with too many updates
    b) To keep the relay state stable
    c) To conserve filesystem write cycles
    d) To maintain battery health

a) To avoid flooding the cloud with too many updates

12
New cards
  1. Why is it important to synchronize the device’s clock via NTP before timestamping sensor data?

    a) To reduce power consumption
    b) To ensure accurate, human-readable log entries
    c) To match the timestamps with a global reference
    d) To enable OTA updates

c) To match the timestamps with a global reference

13
New cards
  1. What benefit does including an epoch timestamp with each data upload provide?

    a) It compresses the data payload for faster transfer
    b) It uniquely identifies each record in time-series
    c) It automatically retries failed uploads
    d) It encrypts the data end-to-end

b) It uniquely identifies each record in time-series

14
New cards
  1. What is the advantage of using a real-time database for IoT sensor data?

    a) It provides instantaneous synchronization across clients
    b) It automatically formats data for printing
    c) It reduces the binary size of the firmware
    d) It eliminates the need for Wi-Fi credentials

a) It provides instantaneous synchronization across clients

15
New cards
  1. Why might the sketch write an error message to the database after a failed operation?

    a) To allow remote monitoring and diagnostics
    b) To trigger a remote reboot of the device
    c) To permanently disable the relay hardware
    d) To free up memory buffers on the device

a) To allow remote monitoring and diagnostics

16
New cards
  1. Which pattern in the sketch helps to throttle cloud request and avoid API limits?

    a) Looping as fast as possible for real-time data
    b) Batching all sensor reads into a single request
    c) Using multiple threads for parallel uploads
    d) Reading sensor and updating cloud only at fixed intervals

d) Reading sensor and updating cloud only at fixed intervals

17
New cards
  1. What is the purpose of calling Wire.begin(12C_SDA, 12C_SCL); in setup()?

    a) To initialize the SPI bus for the display
    b) To set up the I2C bus with custom SDA and SCL pins
    c) To configure the OLED’s reset line
    d) To start the serial monitor

b) To set up the I2C bus with custom SDA and SCL pins

18
New cards
  1. Why is there an infinite loop (for(;;);) immediately after a failed display.begin() call?

    a) To retry initialization repeatedly
    b) To conserve power in low-battery conditions
    c) To halt further execution since the display is unavailable
    d) To trigger a hardware reset of the microcontroller

c) To halt further execution since the display is unavailable

19
New cards
  1. What would happen if you omitted the call to display.begin()?

    a) The text would render at default settings automatically
    b) The program would compile but the display wouldn’t initialize, so nothing appears
    c) The I2C pins would be repurposed as digital outputs
    d) The microcontroller would reset on the first display.display()

b) The program would compile but the display wouldn’t initialize, so nothing appears

20
New cards
  1. What is the main advantage of storing configuration data (e.g., network credentials) in non-volatile memory?

    a) Persisting settings across power cycles
    b) Faster read/write speeds
    c) Automatic data encryption
    d) Reduced code size

a) Persisting settings across power cycles

21
New cards
  1. Why is it beneficial to scan for available networks before presenting options to a user?

    a) To reduce antenna heat generation
    b) To display current signal strengths and network names for selection
    c) To disable all unused radios
    d) To reboot the device automatically

b) To display current signal strengths and network names for selection

22
New cards
  1. Why is it important to clear old configuration data before writing new values?

    a) To reduce EEPROM wear leveling
    b) To compress the stored data
    c) To ensure no leftover character corrupt the new settings
    d) To disable Wi-Fi before writing

c) To ensure no leftover character corrupt the new settings

23
New cards
  1. What is the primary reason for restarting a device after saving new settings?

    a) To clear the serial buffer
    b) To apply the new configuration and attempt connection with updated credentials
    c) To force a firmware
    d) To enter deep-sleep mode

b) To apply the new configuration and attempt connection with updated credentials

24
New cards
  1. Why might a device attempt multiple connection retries before declaring failure?

    a) To generate more log data
    b) To deliberately delay user access
    c) To handle transient network issues and increase the change of success
    d) To reduce battery consumption

c) To handle transient network issues and increase the change of success

25
New cards
  1. What benefit does indicating status (e.g., using an LED) provide when entering configuration mode?

    a) Increases network throughput
    b) Gives visual feedback that the device is ready for setup
    c) Enables faster EEPROM writes
    d) Encrypts all web traffic

b) Gives visual feedback that the device is ready for setup

26
New cards
  1. What is the purpose of using non-blocking scan in a configuration interface?

    a) To block other tasks until scanning completes
    b) To guarantee no networks are missed
    c) To allow the web UI to remain respond while scanning
    d) To prioritize OTA updates

c) To allow the web UI to remain respond while scanning

27
New cards
  1. What component is typically required when using a single-cell Li-Ion battery to power an ESP32?

    a) Boost converter to step up voltage
    b) Buck converter to step down voltage
    c) Battery management/charging IC
    d) Linear regulator with no dropout

c) Battery management/charging IC

28
New cards
  1. What can happen if the battery voltage fails below the ESP32’s minimum operating voltage?

    a) The ESP32 will automatically switch to sleep mode
    b) Brown-out resets or unstable operation
    c) Increased Wi-Fi range
    d) Higher current draw

b) Brown-out resets or unstable operation

29
New cards
  1. What is a common strategy to extend battery life for an outdoor ESP32 sensor node?

    a) Increase Wi-Fi transmit power
    b) Use continuous data logging
    c) Minimize radio usage and leverage deep-sleep
    d) Disable brown-out detection

c) Minimize radio usage and leverage deep-sleep

30
New cards
  1. When combining two Li-Ion cells in series to get 7.4 V, what is needed before feeding the ESP32?

    a) A boost converter to 12 V
    b) A buck converter to 3.3
    c) A direct connection to VIN
    d) A diode for reverse polarity protection

b) A buck converter to 3.3