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. Radio communication
B. Heat communication
C. Light communication
D. Sound communication

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

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

3 What must two Bluetooth devices do before exchanging data?

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

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

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

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

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

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

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

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

voice controlled Bluetooth device Easy
A. Measure circuit resistance
B. Provide mechanical movement
C. Recognize speech and send commands
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. Execute the command
C. Generate spoken language
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. Remove the circuit ground
C. Change the resistor color
D. Increase the wire length

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

voice controlled Bluetooth device Easy
A. A disconnected power supply
B. A blocked microphone
C. A recognizable command format
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. Logic Circuit Driver
D. Liquid Crystal Display

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

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

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

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

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

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

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. System Program Interconnect
C. Simple Power Input
D. Sensor Processing Instruction

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

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

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

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

19 What is the purpose of the SPI clock line?

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

20 What does I2C stand for?

protocol of I2C Easy
A. Inter-Integrated Circuit
B. Internal Input Control
C. Integrated Internet Connection
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 both UART endpoints use the same baud rate
B. Whether the SPI clock polarity is set to high
C. Whether both devices use the same I2C address
D. Whether the LCD backlight jumper is installed

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 voltage divider on the NodeMCU 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 pull-up resistor on the HC-05 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. Buffer incoming bytes until a delimiter is received
B. Restart the Bluetooth module after each character
C. Clear the receive buffer after every incoming byte
D. Delay one second before reading every 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 NodeMCU voltage regulator
D. In the HC-05 radio firmware

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. Reverse the command string before comparison
B. Replace each received character with its ASCII code
C. Increase the UART baud rate after every command
D. Convert received text to one consistent letter case

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. Trim line-ending characters before comparing the command
B. Multiply the received character count by the baud rate
C. Toggle the SPI chip-select line before every comparison
D. Change the I2C address 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. Disable command validation after the first message
B. Stop the motor when a command timeout expires
C. Keep the last motor command active indefinitely
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. Swap the SPI MOSI and MISO signal connections
B. Remove the common ground between the connected devices
C. Adjust the contrast potentiometer on the I2C backpack
D. Increase the Bluetooth UART baud rate to its maximum

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. Run an I2C scanner to discover the actual address
B. Change the SPI data order without testing the bus
C. Run a Bluetooth scan to discover the LCD name
D. Measure the UART stop bit with an analog voltmeter

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. Change one address jumper or use an I2C multiplexer
B. Assign each LCD a different UART baud rate
C. Connect one LCD to MOSI and the other LCD to MISO
D. Send identical data while changing the Bluetooth name

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 sends each LCD pixel directly through a Bluetooth channel
B. It converts two-wire I2C messages into parallel LCD signals
C. It converts one-wire UART messages into analog LCD voltages
D. It stores the complete application inside the LCD controller

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. Provide a separate chip-select line for each sensor
B. Provide a separate MOSI line for each sensor
C. Assign a unique seven-bit I2C address to each sensor
D. Assign a different UART stop bit to 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 I2C fast mode
B. Configure the controller to use SPI mode 0
C. Configure the controller to use UART parity mode
D. Configure the controller to use SPI mode 3

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

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

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. Increase the SPI clock frequency
B. Lower the SPI clock frequency
C. Remove the peripheral chip-select line
D. Replace the clock with an I2C address

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

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

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. The addressed device selected an incorrect SPI clock mode
B. The controller pulled SDA low during the entire address byte
C. No addressed device pulled SDA low during the ACK clock
D. The controller received two UART stop bits after the address

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. Clock stretching
B. Full-duplex transfer
C. Baud-rate detection
D. Chip selection

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, read data, STOP, write register, repeated START, write address
B. Send UART start bit, register byte, parity bit, data byte, stop bit
C. START, write address and register, repeated START, read address and data, STOP
D. Chip select, write register, toggle MOSI, read MISO, release chip select

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. Exactly 64 bytes arrive because UART automatically pauses the Bluetooth sender
B. No bytes arrive because UART reception stops whenever the processor is blocked
C. About 115 bytes arrive, so the receive buffer overflows and some data is lost
D. About 12 bytes arrive, so all data remains safely within the receive buffer

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 delay of 20 ms between every pair of frames
C. A null byte after the payload with no length field
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. Drain UART into a ring buffer and parse frames incrementally
C. Disable interrupts while parsing each received Bluetooth frame
D. Wait for a complete message using a long blocking read

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. 12,800 bytes/s
D. 11,520 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. Trim whitespace, normalize case, and compare the complete command token
D. Convert to lowercase and search only for the substring turn on

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. Store the last command in flash and restore it after every reset
C. Increase the Bluetooth baud rate and repeat the ON command continuously
D. Ignore disconnect events until a new voice command is eventually received

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 SET LAMP ON with a sequence number and cache the result
B. Send TOGGLE LAMP twice and discard the second acknowledgment
C. Insert a fixed delay before executing each TOGGLE LAMP command
D. Increase the UART timeout so the phone never retries a command

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. Execute the command as soon as the first alphabetic byte is received
B. Interpret every callback as one complete command and reject short callbacks
C. Accumulate bytes until the delimiter, then validate and execute the frame
D. Delay each callback by one character time and parse it independently

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. Configure the LCD controller itself to use address 0x27
C. Right-shift 0x3F and initialize the library with 0x1F
D. Send address 0x7E because I2C libraries require an 8-bit address

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. Each nibble must be placed on the data lines and latched with an enable pulse
B. Each byte must be transmitted once as data and once as an I2C address
C. The PCF8574 accepts only two data bits during each I2C transaction
D. The HD44780 requires every byte to be complemented before it is accepted

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 grounded R/W pin prevents the LCD from driving status data
C. The PCF8574 automatically clears the busy flag during every read
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. Keep a display shadow buffer and write only changed character regions
B. Reinitialize the LCD controller after each completed refresh cycle
C. Raise the refresh rate so complete rewrites finish more frequently
D. Call clear() before every row instead of before every screen

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 2: CPOL=1, CPHA=0
C. Mode 3: CPOL=1, CPHA=1
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. Assert both CS lines, select the slower frequency, transfer, then release both lines
B. Configure the selected device's settings, assert only its CS, transfer, then deassert CS
C. Switch clock mode while CS remains asserted so each byte can use different settings
D. Configure SPI once for the faster device and let the slower device ignore extra edges

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. SPI requires master-generated clock pulses, so outgoing dummy bits clock incoming data
C. Dummy bytes acknowledge the address in the same way as I2C acknowledgment bits
D. SPI slaves can transmit only while the master drives MOSI permanently high

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 28.6 MHz
B. Approximately 44.4 MHz
C. Approximately 22.2 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 159 ns, so the bus comfortably satisfies the Fast-mode limit
B. About 1.59 µs, so the bus violates the Fast-mode rise-time limit
C. About 59 ns, so the pull-up is unnecessarily strong for Fast mode
D. About 3.19 µs, so only the falling edge violates the Fast-mode limit

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 1 detects a low level, loses arbitration, and stops transmitting
B. Both masters detect a collision and immediately force the clock line permanently low
C. The master sending 0 detects a low level, loses arbitration, and stops transmitting
D. Both masters continue because address arbitration occurs only after the acknowledgment

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, write address, register byte, repeated START, read address, data, STOP
B. START, register byte, write address, read address, data bytes, STOP
C. START, write address, register byte, STOP, data bytes, repeated START
D. START, read address, register byte, repeated START, write 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. Drive SDA high actively, leave SCL floating, and immediately send an address
B. Pulse SCL up to nine times, generate a STOP, and then reinitialize I2C
C. Hold SCL low for nine byte periods, generate a START, and reset the baud rate
D. Transmit nine zero bytes on SDA, omit STOP, and restart the application