Unit 5: Bluetooth with NodeMCU - Practice Quiz

ECE237 — Architecting Smart Iot Devices 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What type of wireless communication is used by Bluetooth?

data transfer through Bluetooth interface Easy
A. Light communication
B. Radio communication
C. Sound communication
D. Heat communication

2 Which Bluetooth device usually sends data to a NodeMCU project?

data transfer through Bluetooth interface Easy
A. Bluetooth smartphone
B. USB cable
C. Power adapter
D. Temperature sensor

3 What must two Bluetooth devices do before exchanging data?

data transfer through Bluetooth interface Easy
A. Change the clock speed
B. Remove the antenna
C. Increase the voltage
D. Pair with each other

4 What is the main purpose of a Bluetooth interface in a NodeMCU project?

data transfer through Bluetooth interface Easy
A. Wireless data exchange
B. Voltage regulation
C. Battery charging
D. Program compilation

5 Which connection is normally required for short-range Bluetooth communication?

data transfer through Bluetooth interface Easy
A. Optical fiber link
B. Parallel wire link
C. Wireless radio link
D. Coaxial cable link

6 What converts spoken words into commands for a voice-controlled Bluetooth device?

voice controlled Bluetooth device Easy
A. Voice recognition system
B. Crystal oscillator
C. Light sensor
D. Voltage regulator

7 In a voice-controlled Bluetooth project, what does the smartphone commonly do?

voice controlled Bluetooth device Easy
A. Recognize speech and send commands
B. Measure circuit resistance
C. Provide mechanical movement
D. Store electrical energy

8 What is the role of the NodeMCU after receiving a voice command?

voice controlled Bluetooth device Easy
A. Pair with a battery
B. Generate spoken language
C. Execute the command
D. Increase radio frequency

9 Which command could be used in a simple voice-controlled device?

voice controlled Bluetooth device Easy
A. Turn on the light
B. Increase the wire length
C. Remove the circuit ground
D. Change the resistor color

10 What is an important requirement for a voice-controlled Bluetooth system?

voice controlled Bluetooth device Easy
A. A recognizable command format
B. A disconnected power supply
C. A blocked microphone
D. An unused output pin

11 What does LCD stand for?

liquid crystal display with I2C Easy
A. Light Control Device
B. Local Current Detector
C. Liquid Crystal Display
D. Logic Circuit Driver

12 What is the main advantage of connecting an LCD through I2C?

liquid crystal display with I2C Easy
A. Longer antenna range
B. Faster motor rotation
C. Higher battery voltage
D. Fewer microcontroller pins

13 Which two signal lines are commonly used by an I2C LCD?

liquid crystal display with I2C Easy
A. VCC and GND
B. MOSI and MISO
C. TX and RX
D. SDA and SCL

14 What type of information can an LCD connected to NodeMCU display?

liquid crystal display with I2C Easy
A. Only radio waves
B. Text and numbers
C. Only electrical power
D. Only sound signals

15 What is the purpose of an I2C backpack attached to an LCD?

liquid crystal display with I2C Easy
A. Convert Bluetooth into Wi-Fi
B. Store the NodeMCU program
C. Provide I2C communication
D. Increase screen brightness only

16 What does SPI stand for?

protocol of SPI Easy
A. Serial Peripheral Interface
B. Sensor Processing Instruction
C. System Program Interconnect
D. Simple Power Input

17 Which SPI line carries data from the controller to a peripheral?

protocol of SPI Easy
A. SCL
B. SDA
C. MOSI
D. MISO

18 Which SPI line carries data from a peripheral to the controller?

protocol of SPI Easy
A. MISO
B. CS
C. SCK
D. MOSI

19 What is the purpose of the SPI clock line?

protocol of SPI Easy
A. Select the display color
B. Store received data
C. Supply power to sensors
D. Synchronize data transfer

20 What does I2C stand for?

protocol of I2C Easy
A. Integrated Internet Connection
B. Inter-Integrated Circuit
C. Internal Input Control
D. Industrial Interface Cable

21 A NodeMCU ESP8266 must exchange text commands with an HC-05 Bluetooth module. Which connection arrangement is most appropriate?

data transfer through Bluetooth interface Medium
A. HC-05 TX to NodeMCU TX and HC-05 RX to NodeMCU RX
B. HC-05 MOSI to NodeMCU RX and HC-05 MISO to NodeMCU TX
C. HC-05 SCL to NodeMCU RX and HC-05 SDA to NodeMCU TX
D. HC-05 TX to NodeMCU RX and HC-05 RX to NodeMCU TX

22 A Bluetooth module sends characters correctly at first, but the NodeMCU later displays unreadable symbols. What should be checked first?

data transfer through Bluetooth interface Medium
A. Whether the SPI clock polarity is set to high
B. Whether both UART endpoints use the same baud rate
C. Whether the LCD backlight jumper is installed
D. Whether both devices use the same I2C address

23 The HC-05 RX input is rated for lower logic voltage than the NodeMCU transmit signal. Which interface change best protects the module?

data transfer through Bluetooth interface Medium
A. Add a pull-up resistor on the HC-05 TX path
B. Add a capacitor in series with both UART lines
C. Add a crystal oscillator beside the HC-05 module
D. Add a voltage divider on the NodeMCU TX path

24 A NodeMCU program receives Bluetooth bytes faster than it processes them. Which technique most directly reduces the chance of losing a complete command?

data transfer through Bluetooth interface Medium
A. Clear the receive buffer after every incoming byte
B. Delay one second before reading every character
C. Buffer incoming bytes until a delimiter is received
D. Restart the Bluetooth module after each character

25 In a typical voice-controlled NodeMCU system using an HC-05, where is spoken language usually converted into a text command?

voice controlled Bluetooth device Medium
A. In the connected I2C display controller
B. In the smartphone voice-control application
C. In the HC-05 radio firmware
D. In the NodeMCU voltage regulator

26 A lamp should turn on for voice inputs such as Turn on light and turn on light. Which processing step makes command recognition more reliable?

voice controlled Bluetooth device Medium
A. Convert received text to one consistent letter case
B. Increase the UART baud rate after every command
C. Replace each received character with its ASCII code
D. Reverse the command string before comparison

27 A voice application sends FAN ON\r\n, but the program compares the input only with FAN ON. What is the most suitable correction?

voice controlled Bluetooth device Medium
A. Multiply the received character count by the baud rate
B. Change the I2C address before comparing the command
C. Toggle the SPI chip-select line before every comparison
D. Trim line-ending characters before comparing the command

28 A voice-controlled motor must stop automatically if the Bluetooth connection becomes inactive. Which design best supports this requirement?

voice controlled Bluetooth device Medium
A. Keep the last motor command active indefinitely
B. Stop the motor when a command timeout expires
C. Disable command validation after the first message
D. Increase motor speed whenever no bytes arrive

29 An I2C LCD backlight turns on, but no characters appear even though wiring and code are otherwise correct. Which adjustment should be tried first?

liquid crystal display with I2C Medium
A. Increase the Bluetooth UART baud rate to its maximum
B. Swap the SPI MOSI and MISO signal connections
C. Remove the common ground between the connected devices
D. Adjust the contrast potentiometer on the I2C backpack

30 A program initializes an I2C LCD at address 0x27, but the display does not respond. What is the most useful diagnostic action?

liquid crystal display with I2C Medium
A. Measure the UART stop bit with an analog voltmeter
B. Run an I2C scanner to discover the actual address
C. Run a Bluetooth scan to discover the LCD name
D. Change the SPI data order without testing the bus

31 Two I2C LCD backpacks have the same fixed address and must be controlled independently by one NodeMCU. Which solution is most appropriate?

liquid crystal display with I2C Medium
A. Assign each LCD a different UART baud rate
B. Send identical data while changing the Bluetooth name
C. Change one address jumper or use an I2C multiplexer
D. Connect one LCD to MOSI and the other LCD to MISO

32 Why does an I2C backpack reduce the number of NodeMCU pins needed for a parallel character LCD?

liquid crystal display with I2C Medium
A. It stores the complete application inside the LCD controller
B. It converts two-wire I2C messages into parallel LCD signals
C. It converts one-wire UART messages into analog LCD voltages
D. It sends each LCD pixel directly through a Bluetooth channel

33 A NodeMCU communicates with two SPI sensors that use the same clock and data lines. How should it select one sensor at a time?

protocol of SPI Medium
A. Assign a unique seven-bit I2C address to each sensor
B. Assign a different UART stop bit to each sensor
C. Provide a separate MOSI line for each sensor
D. Provide a separate chip-select line for each sensor

34 An SPI sensor returns shifted or incorrect values although its wiring is correct. Its datasheet specifies CPOL = 1 and CPHA = 1. What should be changed?

protocol of SPI Medium
A. Configure the controller to use SPI mode 0
B. Configure the controller to use I2C fast mode
C. Configure the controller to use SPI mode 3
D. Configure the controller to use UART parity mode

35 Which SPI characteristic allows a controller to transmit and receive one bit during the same clock pulse?

protocol of SPI Medium
A. Separate MOSI and MISO data lines
B. A start condition followed by an ACK bit
C. A shared bidirectional SDA data line
D. A seven-bit peripheral address field

36 An SPI peripheral is reliable at 1 MHz but fails intermittently at 10 MHz with long jumper wires. What is the best first modification?

protocol of SPI Medium
A. Lower the SPI clock frequency
B. Increase the SPI clock frequency
C. Replace the clock with an I2C address
D. Remove the peripheral chip-select line

37 Why are pull-up resistors normally required on I2C SDA and SCL lines?

protocol of I2C Medium
A. Devices use the resistors to select clock phase and polarity
B. Devices actively pull lines low but release them for high
C. Devices actively drive both lines high during every data bit
D. Devices need the resistors to generate unique bus addresses

38 During an I2C transfer, the controller sends an address but receives no acknowledgment. What does this most directly indicate?

protocol of I2C Medium
A. No addressed device pulled SDA low during the ACK clock
B. The controller received two UART stop bits after the address
C. The controller pulled SDA low during the entire address byte
D. The addressed device selected an incorrect SPI clock mode

39 A slow I2C peripheral holds SCL low after the controller attempts to raise it. Which protocol feature is being used?

protocol of I2C Medium
A. Baud-rate detection
B. Chip selection
C. Clock stretching
D. Full-duplex transfer

40 A NodeMCU must read a register from an I2C sensor without releasing control of the bus between writing the register number and reading its value. Which sequence is appropriate?

protocol of I2C Medium
A. START, write address and register, repeated START, read address and data, STOP
B. START, read data, STOP, write register, repeated START, write address
C. Chip select, write register, toggle MOSI, read MISO, release chip select
D. Send UART start bit, register byte, parity bit, data byte, stop bit

41 A NodeMCU receives data from an HC-05 module through a 9600-baud UART configured as 8N1. The firmware blocks for 120 ms while updating another peripheral, and the UART receive buffer holds 64 bytes. What is the most likely result if Bluetooth data arrives continuously during the blocking interval?

data transfer through Bluetooth interface Hard
A. About 12 bytes arrive, so all data remains safely within the receive buffer
B. About 115 bytes arrive, so the receive buffer overflows and some data is lost
C. No bytes arrive because UART reception stops whenever the processor is blocked
D. Exactly 64 bytes arrive because UART automatically pauses the Bluetooth sender

42 A Bluetooth sender transmits binary sensor frames over a UART stream. Any byte value, including newline, may occur in the payload. Which framing design most reliably allows the NodeMCU to detect complete frames and reject corrupted ones?

data transfer through Bluetooth interface Hard
A. A fixed header, payload length, payload bytes, and CRC
B. A null byte after the payload with no length field
C. A delay of 20 ms between every pair of frames
D. A newline after the payload with no escaping mechanism

43 An HC-05 sends bytes faster than the NodeMCU application can process them. Hardware flow-control pins are unavailable. Which firmware architecture best minimizes loss while keeping Wi-Fi tasks responsive?

data transfer through Bluetooth interface Hard
A. Add fixed delays after processing every received character
B. Disable interrupts while parsing each received Bluetooth frame
C. Wait for a complete message using a long blocking read
D. Drain UART into a ring buffer and parse frames incrementally

44 A UART Bluetooth link is configured for 115200 baud, 8 data bits, no parity, and 1 stop bit. Ignoring Bluetooth-layer overhead, what is the maximum theoretical payload rate for continuously transmitted UART bytes?

data transfer through Bluetooth interface Hard
A. 115,200 bytes/s
B. 14,400 bytes/s
C. 11,520 bytes/s
D. 12,800 bytes/s

45 A voice-control application may send TURN ON LIGHT, turn on light\r\n, or Turn On Light. Which command-processing strategy provides reliable recognition without accidentally accepting turn on lighting?

voice controlled Bluetooth device Hard
A. Compare the raw received bytes directly with the uppercase phrase
B. Remove all spaces and accept commands that begin with turnonlight
C. Convert to lowercase and search only for the substring turn on
D. Trim whitespace, normalize case, and compare the complete command token

46 A voice-controlled heater remains on if the phone disconnects immediately after sending the ON command. Which design best addresses this communication-failure hazard?

voice controlled Bluetooth device Hard
A. Require periodic authenticated keep-alive messages and turn off after a timeout
B. Increase the Bluetooth baud rate and repeat the ON command continuously
C. Ignore disconnect events until a new voice command is eventually received
D. Store the last command in flash and restore it after every reset

47 A phone retries a voice command when its acknowledgment is delayed. The command TOGGLE LAMP may therefore arrive twice, returning the lamp to its original state. Which protocol change best solves this problem?

voice controlled Bluetooth device Hard
A. Send TOGGLE LAMP twice and discard the second acknowledgment
B. Increase the UART timeout so the phone never retries a command
C. Insert a fixed delay before executing each TOGGLE LAMP command
D. Send SET LAMP ON with a sequence number and cache the result

48 A Bluetooth voice application sends FAN:75\n, but UART callbacks sometimes deliver FA and N:75\n separately. What should the NodeMCU do?

voice controlled Bluetooth device Hard
A. Delay each callback by one character time and parse it independently
B. Accumulate bytes until the delimiter, then validate and execute the frame
C. Execute the command as soon as the first alphabetic byte is received
D. Interpret every callback as one complete command and reject short callbacks

49 An I2C scanner detects an LCD backpack at address 0x3F, but the LCD library was initialized with 0x27. Electrical connections and pull-ups are correct. What is the most direct correction?

liquid crystal display with I2C Hard
A. Initialize the LCD library with address 0x3F
B. Right-shift 0x3F and initialize the library with 0x1F
C. Send address 0x7E because I2C libraries require an 8-bit address
D. Configure the LCD controller itself to use address 0x27

50 A PCF8574-based LCD backpack operates an HD44780 display in 4-bit mode. Why must the expander output typically be updated multiple times to send one LCD byte?

liquid crystal display with I2C Hard
A. The HD44780 requires every byte to be complemented before it is accepted
B. The PCF8574 accepts only two data bits during each I2C transaction
C. Each nibble must be placed on the data lines and latched with an enable pulse
D. Each byte must be transmitted once as data and once as an I2C address

51 An LCD backpack permanently connects the HD44780 R/W pin to ground. A developer attempts to poll the LCD busy flag through the PCF8574. Why does this fail?

liquid crystal display with I2C Hard
A. The busy flag is available only when the LCD uses 8-bit mode
B. The PCF8574 automatically clears the busy flag during every read
C. The grounded R/W pin prevents the LCD from driving status data
D. The I2C controller consumes the busy flag as an acknowledgment bit

52 A 20x4 I2C LCD is refreshed by calling clear() and rewriting all characters every 100 ms. The display flickers and I2C traffic delays other sensors. Which redesign is most appropriate?

liquid crystal display with I2C Hard
A. Raise the refresh rate so complete rewrites finish more frequently
B. Reinitialize the LCD controller after each completed refresh cycle
C. Call clear() before every row instead of before every screen
D. Keep a display shadow buffer and write only changed character regions

53 An SPI sensor specifies that data changes on the falling edge and is sampled on the rising edge, with the clock idle low. Which SPI mode should the NodeMCU use?

protocol of SPI Hard
A. Mode 0: CPOL=0, CPHA=0
B. Mode 3: CPOL=1, CPHA=1
C. Mode 2: CPOL=1, CPHA=0
D. Mode 1: CPOL=0, CPHA=1

54 Two SPI peripherals share SCLK, MOSI, and MISO, but require different clock modes and frequencies. Which transaction sequence prevents bus conflicts and configuration errors?

protocol of SPI Hard
A. Switch clock mode while CS remains asserted so each byte can use different settings
B. Configure the selected device's settings, assert only its CS, transfer, then deassert CS
C. Configure SPI once for the faster device and let the slower device ignore extra edges
D. Assert both CS lines, select the slower frequency, transfer, then release both lines

55 A NodeMCU must read a two-byte SPI status register. After sending the read command and address, why does the master usually transmit dummy bytes while receiving the result?

protocol of SPI Hard
A. Dummy bytes switch the bus direction from half-duplex mode to full-duplex mode
B. Dummy bytes acknowledge the address in the same way as I2C acknowledgment bits
C. SPI slaves can transmit only while the master drives MOSI permanently high
D. SPI requires master-generated clock pulses, so outgoing dummy bits clock incoming data

56 An SPI ADC guarantees valid MISO data 35 ns after the sampling edge. The NodeMCU input requires 10 ns of setup time before the next relevant edge. Ignoring other delays and assuming half a clock period is available, what is the highest theoretical SPI clock frequency?

protocol of SPI Hard
A. Approximately 22.2 MHz
B. Approximately 28.6 MHz
C. Approximately 44.4 MHz
D. Approximately 11.1 MHz

57 An I2C bus uses a 4.7 kΩ pull-up and has 400 pF total capacitance. Using the approximation , what rise time should be expected, and what does it imply for Fast-mode I2C with a 300 ns maximum rise time?

protocol of I2C Hard
A. About 3.19 µs, so only the falling edge violates the Fast-mode limit
B. About 1.59 µs, so the bus violates the Fast-mode rise-time limit
C. About 159 ns, so the bus comfortably satisfies the Fast-mode limit
D. About 59 ns, so the pull-up is unnecessarily strong for Fast mode

58 Two I2C masters start transmitting simultaneously. One sends a logic 1 while the other sends a logic 0 during the same address bit. What happens on a correctly implemented bus?

protocol of I2C Hard
A. The master sending 0 detects a low level, loses arbitration, and stops transmitting
B. Both masters detect a collision and immediately force the clock line permanently low
C. Both masters continue because address arbitration occurs only after the acknowledgment
D. The master sending 1 detects a low level, loses arbitration, and stops transmitting

59 To read bytes from an I2C device's internal register, a master writes the register address and then reads data without releasing bus ownership. Which bus sequence correctly performs this operation?

protocol of I2C Hard
A. START, register byte, write address, read address, data bytes, STOP
B. START, write address, register byte, STOP, data bytes, repeated START
C. START, read address, register byte, repeated START, write address, data, STOP
D. START, write address, register byte, repeated START, read address, data, STOP

60 After a NodeMCU resets during an I2C read, a slave remains in a partial transaction and holds SDA low. Which recovery procedure is generally appropriate before reinitializing the controller?

protocol of I2C Hard
A. Hold SCL low for nine byte periods, generate a START, and reset the baud rate
B. Drive SDA high actively, leave SCL floating, and immediately send an address
C. Pulse SCL up to nine times, generate a STOP, and then reinitialize I2C
D. Transmit nine zero bytes on SDA, omit STOP, and restart the application