Unit 1: Getting started with NodeMCU - Practice Quiz

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

1 Which microcontroller chip is commonly used on the classic NodeMCU development board?

NodeMCU Board and supported peripherals Easy
A. RP2040
B. ESP8266
C. STM32F103
D. ATmega328P

2 Which wireless communication feature is built into an ESP8266-based NodeMCU board?

NodeMCU Board and supported peripherals Easy
A. NFC
B. Zigbee
C. Wi-Fi
D. LoRa

3 Which peripheral can be connected to a NodeMCU GPIO pin to provide a simple visual indication?

NodeMCU Board and supported peripherals Easy
A. Loudspeaker
B. Camera
C. Microphone
D. LED

4 Which NodeMCU feature allows it to read an analog sensor value?

NodeMCU Board and supported peripherals Easy
A. ADC input
B. UART output
C. PWM output
D. I2C clock

5 Which application is commonly used to write and upload Arduino-style programs to NodeMCU?

setting up nodemcu Easy
A. Arduino IDE
B. GIMP
C. Audacity
D. Blender

6 What must be installed in the Arduino IDE to program an ESP8266-based NodeMCU?

setting up nodemcu Easy
A. FPGA synthesis package
B. ESP8266 board package
C. AVR board package
D. ARM Linux image

7 Which Arduino IDE menu is normally used to select the connected NodeMCU model?

setting up nodemcu Easy
A. Tools > Board
B. Help > About
C. Edit > Copy
D. File > Open

8 What is the main purpose of selecting a serial port before uploading a NodeMCU program?

serial port programming Easy
A. To configure the Wi-Fi password
B. To select the GPIO voltage
C. To identify the connected board
D. To change the CPU architecture

9 Which Arduino IDE tool displays text sent by a NodeMCU over the serial connection?

serial port programming Easy
A. Sketch Formatter
B. Board Manager
C. Serial Monitor
D. Library Manager

10 Which function starts serial communication in an Arduino-style NodeMCU sketch?

serial port programming Easy
A. Serial.begin()
B. Serial.print()
C. Serial.read()
D. Serial.end()

11 What should match between the NodeMCU program and the Serial Monitor for readable output?

serial port programming Easy
A. Pin voltage
B. Wi-Fi channel
C. Baud rate
D. Flash size

12 Which statement configures a GPIO pin named ledPin as an output?

configuring general purpose input output pins as output Easy
A. analogRead(ledPin);
B. pinMode(ledPin, INPUT);
C. digitalRead(ledPin);
D. pinMode(ledPin, OUTPUT);

13 Which function writes a digital value to a NodeMCU output pin?

configuring general purpose input output pins as output Easy
A. digitalWrite()
B. digitalRead()
C. Serial.read()
D. analogRead()

14 What does digitalWrite(ledPin, HIGH); normally do to an active-high LED circuit?

configuring general purpose input output pins as output Easy
A. Turns the LED on
B. Configures the LED pin
C. Turns the LED off
D. Reads the LED state

15 Which statement configures a GPIO pin named buttonPin as a basic input?

configuring general purpose input output pins as input Easy
A. digitalWrite(buttonPin, HIGH);
B. pinMode(buttonPin, OUTPUT);
C. analogWrite(buttonPin, LOW);
D. pinMode(buttonPin, INPUT);

16 Which function reads the logic state of a digital input pin?

configuring general purpose input output pins as input Easy
A. digitalWrite()
B. pinMode()
C. Serial.begin()
D. digitalRead()

17 Which input mode enables a GPIO pin's internal pull-up resistor?

configuring general purpose input output pins as input Easy
A. OUTPUT_OPEN_DRAIN
B. INPUT_PULLUP
C. OUTPUT
D. INPUT

18 Which chip generally provides more GPIO pins and processing capability?

Comparison of ESP8266 and ESP32 Easy
A. NE555
B. ESP32
C. ATtiny85
D. ESP8266

19 Which wireless feature is commonly available on ESP32 but not built into ESP8266?

Comparison of ESP8266 and ESP32 Easy
A. TCP/IP
B. Wi-Fi
C. HTTP
D. Bluetooth

20 Which statement correctly compares the wireless capabilities of ESP8266 and ESP32?

Comparison of ESP8266 and ESP32 Easy
A. Only ESP8266 supports Wi-Fi
B. Neither supports Wi-Fi
C. Only ESP32 supports Wi-Fi
D. Both support Wi-Fi

21 A sensor provides an analog voltage that must be read by a NodeMCU ESP8266 board. Which interface should be selected?

NodeMCU Board and supported peripherals Medium
A. The USB connector
B. A digital GPIO pin
C. The UART TX pin
D. The ADC pin

22 A project needs to connect an I2C temperature sensor and an SPI display to a NodeMCU board. What is the most appropriate conclusion?

NodeMCU Board and supported peripherals Medium
A. Only the SPI display can be connected to NodeMCU
B. Neither interface is supported by the NodeMCU board
C. Only the I2C sensor can be connected to NodeMCU
D. Both interfaces can be supported using suitable GPIO pins

23 Why should the voltage requirements of an external peripheral be checked before connecting it to NodeMCU GPIO pins?

NodeMCU Board and supported peripherals Medium
A. Incorrect voltage levels may damage the board or produce unreliable logic
B. The USB cable determines the voltage of every connected peripheral
C. GPIO pins automatically increase their voltage for every peripheral
D. NodeMCU GPIO pins can safely accept any voltage below

24 After connecting a NodeMCU board to a computer, it does not appear as a serial device. Which step is most likely required?

setting up nodemcu Medium
A. Install the driver for the board's USB-to-serial converter
B. Replace the ESP8266 with an ESP32 processor
C. Connect an analog sensor to the ADC pin
D. Configure all GPIO pins as outputs first

25 A program compiles successfully but uploading fails with a timeout. Which action is most appropriate to check first?

setting up nodemcu Medium
A. Change every output pin to an input pin
B. Remove the board's USB-to-serial circuitry
C. Increase the number of connected LEDs
D. Verify the selected board and serial port settings

26 A NodeMCU sketch uses a library for an I2C sensor, but compilation reports that the library cannot be found. What should be done?

setting up nodemcu Medium
A. Change the sensor connection from I2C to UART
B. Format the NodeMCU flash memory manually
C. Install or correctly reference the required library
D. Set the sensor pins as analog outputs

27 During serial programming, the upload tool reports that the selected port is unavailable. What is the most likely cause?

serial port programming Medium
A. The connected sensor is using an unsupported color wire
B. The wrong serial port was selected or another program is using it
C. The ADC input voltage is outside its normal range
D. The GPIO output current is too low

28 A program is uploaded successfully, but the Serial Monitor displays unreadable characters. Which setting should be checked?

serial port programming Medium
A. The board's analog reference temperature
B. The GPIO pull-up resistance only
C. The Serial Monitor baud rate
D. The LED forward voltage

29 Why should a program avoid sending serial data continuously inside a high-speed loop without delay or control?

serial port programming Medium
A. It prevents the processor from executing any machine instructions
B. It permanently converts UART pins into analog inputs
C. It disables the USB driver after exactly ten messages
D. It can flood the serial buffer and make output difficult to process

30 A NodeMCU application must send sensor readings to a computer while also controlling an actuator. Which design is most suitable?

serial port programming Medium
A. Use the reset pin as a continuous data output
B. Use serial output for readings and GPIO control for the actuator
C. Use the ADC pin to transmit all readings directly to the computer
D. Use the USB connector as a replacement for every GPIO function

31 An LED should turn on when a GPIO is driven HIGH. Which configuration and operation are required?

configuring general purpose input output pins as output Medium
A. Configure the ADC channel and write an analog voltage
B. Configure the pin as INPUT_PULLUP and write LOW
C. Configure the pin as OUTPUT and write HIGH
D. Configure the pin as INPUT and write HIGH

32 An LED connected from a GPIO pin to ground remains off even though the program writes HIGH. Which issue should be investigated first?

configuring general purpose input output pins as output Medium
A. The board must be powered through the GPIO pin
B. The pin may not have been configured as an output
C. The serial monitor baud rate must be doubled
D. The ADC resolution must be reduced to one bit

33 Why is a current-limiting resistor normally placed in series with an LED controlled by a NodeMCU GPIO?

configuring general purpose input output pins as output Medium
A. It allows the GPIO to safely provide unlimited current
B. It increases the GPIO voltage above the supply voltage
C. It changes the LED into a digital input device
D. It limits current through the LED and protects the GPIO

34 A relay requires more current than a NodeMCU GPIO can provide. Which interface is the safest practical solution?

configuring general purpose input output pins as output Medium
A. Use the ADC pin as a higher-current output
B. Drive a transistor or relay module from the GPIO
C. Tie the relay coil directly between two input pins
D. Connect the relay coil directly to the GPIO

35 A pushbutton is connected between a GPIO pin and ground, and the internal pull-up resistor is enabled. What value is normally read when the button is released?

configuring general purpose input output pins as input Medium
A. HIGH
B. LOW
C. A continuously changing analog value
D. No value because pull-ups disable digital input

36 A digital input changes randomly when a switch is not pressed. What is the most likely explanation?

configuring general purpose input output pins as input Medium
A. The ADC is forcing the input to alternate states
B. The output pin is receiving too much serial data
C. The input is floating without a defined logic level
D. The USB cable is converting every LOW into HIGH

37 A sensor output is connected to a GPIO configured as a digital input, but the program always reads LOW. Which check is most relevant?

configuring general purpose input output pins as input Medium
A. Increase the serial baud rate until the input becomes HIGH
B. Configure the GPIO as an analog output instead
C. Disconnect the ground connection to remove signal loading
D. Check the sensor supply, common ground, wiring, and signal voltage

38 A mechanical button produces several rapid transitions when pressed. Which software technique can reduce false multiple detections?

configuring general purpose input output pins as input Medium
A. Increase the GPIO output current during the button press
B. Debounce the input by requiring a stable state for a short interval
C. Disable the ground connection during the transition
D. Read the button only through the ADC without filtering

39 A design requires Bluetooth connectivity in addition to Wi-Fi. Which choice is generally more appropriate?

Comparison of ESP8266 and ESP32 Medium
A. An external resistor network alone
B. ESP8266
C. A USB-to-serial adapter alone
D. ESP32

40 A project needs several independent analog inputs and more processing capability than a basic Wi-Fi sensor node. Which controller is usually the better choice?

Comparison of ESP8266 and ESP32 Medium
A. ESP32
B. ESP8266
C. A single digital logic gate
D. A serial cable without a microcontroller

41 A NodeMCU ESP8266 application must communicate with an I2C sensor, a 3.3 V SPI display, and a UART GPS module at the same time. Which design is most appropriate?

NodeMCU Board and supported peripherals Hard
A. Use UART0 for I2C, GPIO16 for SPI clock, and UART1 for GPS
B. Use the flash-connected GPIO6-GPIO11 pins for the display while reserving GPIO0 for I2C
C. Use GPIO5 and GPIO4 for I2C, hardware SPI pins for the display, and UART0 for GPS
D. Use software I2C, hardware SPI, and the second UART only

42 Why should a NodeMCU design avoid assigning GPIO6 through GPIO11 to user peripherals, even when those pins appear as physical connections on some ESP8266 modules?

NodeMCU Board and supported peripherals Hard
A. They are reserved for the module's external SPI flash interface
B. They are analog-only pins with no digital output capability
C. They can be used only when the Wi-Fi radio is disabled
D. They are permanently connected to the USB-to-serial converter

43 A 5 V sensor output is connected directly to a NodeMCU GPIO input. The firmware is correct, but the board becomes unreliable over time. What is the primary architectural fault?

NodeMCU Board and supported peripherals Hard
A. The GPIO input requires an external crystal oscillator
B. The NodeMCU board converts all input signals to 1.8 V
C. The sensor output is too weak to trigger a digital input
D. The sensor output exceeds the ESP8266 GPIO voltage tolerance

44 A newly connected NodeMCU appears in the operating system, but the IDE shows no usable serial port. Which diagnostic sequence is most defensible?

setting up nodemcu Hard
A. Change the sketch delay, then replace the ESP8266 core
B. Connect the sensor ground first, then select the ESP32 board profile
C. Install the correct USB-UART driver, reconnect the board, and verify the enumerated port
D. Set the serial monitor to 74880 baud, then erase the flash

45 A sketch compiles successfully but fails during upload with intermittent connection errors. Which combination is most likely to resolve a setup-related failure?

setting up nodemcu Hard
A. Select an ESP32 profile and increase serial monitor baud rate
B. Replace every digitalWrite() call with analogWrite() before uploading
C. Increase sensor sampling frequency and disable GPIO pull-ups
D. Select the correct ESP8266 board profile and reduce upload speed

46 A NodeMCU resets whenever a relay module is energized, although the GPIO voltage is correct when measured without the relay. Which setup change addresses the most likely root cause?

setting up nodemcu Hard
A. Change the board selection to ESP32 while leaving the relay wiring unchanged
B. Configure the relay GPIO as an analog input and increase the baud rate
C. Power the relay from the ESP8266 3.3 V pin and remove the ground connection
D. Use a separate relay supply, common the grounds, and add proper flyback protection

47 The bootloader messages from an ESP8266 are readable at 74880 baud, but the application output is readable only at 115200 baud. What is the correct interpretation?

serial port programming Hard
A. The UART hardware is defective and must be replaced
B. The serial monitor is decoding SPI traffic as UART traffic
C. The ESP8266 changes its CPU architecture after uploading
D. The bootloader and application are using different intentional baud configurations

48 A program sends binary packets over UART, but the receiver occasionally splits one packet into two reads. Which implementation change is most appropriate?

serial port programming Hard
A. Add packet framing, a length or delimiter field, and validation
B. Increase the GPIO drive strength on the UART pins
C. Assume each read returns exactly one complete packet
D. Use a faster baud rate without changing the packet format

49 A NodeMCU sketch uses UART0 for both debugging and a GPS receiver. GPS sentences become corrupted whenever diagnostic text is printed. What is the best correction?

serial port programming Hard
A. Increase the GPS supply voltage to compensate for serial contention
B. Move diagnostics to a separate interface or disable them during GPS reception
C. Use GPIO16 as a second full-duplex UART without additional software support
D. Change GPS data from UART to I2C without changing the receiver

50 An upload tool cannot enter the ESP8266 bootloader even though TX and RX are crossed correctly. Which signal condition is required during reset for serial downloading?

serial port programming Hard
A. GPIO2 must alternate rapidly while the chip is reset
B. GPIO0 must be low while the chip is reset
C. GPIO0 must be high while the chip is reset
D. GPIO16 must be low while the chip is reset

51 An LED is connected from 3.3 V through a resistor to GPIO5, so the LED is active-low. Which initialization and control logic are correct?

configuring general purpose input output pins as output Hard
A. Set GPIO5 as OUTPUT; write LOW to turn the LED on
B. Set GPIO5 as INPUT_PULLUP; write LOW to turn the LED on
C. Set GPIO5 as INPUT; write HIGH to turn the LED on
D. Set GPIO5 as OUTPUT; write HIGH to turn the LED on

52 A boot-sensitive NodeMCU pin controls a motor driver enable input. The motor starts briefly during reset. Which design principle best prevents this hazard?

configuring general purpose input output pins as output Hard
A. Drive the pin immediately after setup() and ignore reset behavior
B. Replace the digital output with an ADC measurement
C. Use GPIO6 because flash pins have a fixed safe startup state
D. Use a boot-strap-compatible default state and add external biasing

53 A developer wants a 1 kHz LED brightness waveform on GPIO16 using analogWrite(). What is the main issue with this plan on ESP8266 NodeMCU?

configuring general purpose input output pins as output Hard
A. GPIO16 accepts only 5 V output levels for PWM operation
B. GPIO16 can generate PWM only when configured as an analog input
C. GPIO16 has special limitations and is not a general PWM-capable pin
D. GPIO16 is reserved exclusively for UART0 receive

54 A pushbutton connected between GPIO4 and ground reads randomly when released. Which configuration is the simplest reliable correction if the board's internal pull-up is suitable?

configuring general purpose input output pins as input Hard
A. Configure GPIO4 as INPUT_PULLDOWN and treat HIGH as pressed
B. Configure GPIO4 as OUTPUT and drive it high while reading it
C. Configure GPIO4 as INPUT and leave the button disconnected
D. Configure GPIO4 as INPUT_PULLUP and treat LOW as pressed

55 A long cable connects a switch to a NodeMCU input and produces multiple transitions for one press. Which solution addresses both electrical noise and software interpretation?

configuring general purpose input output pins as input Hard
A. Increase the UART baud rate and sample the switch only after Wi-Fi transmission
B. Remove the pull resistor so the cable can settle at its natural voltage
C. Add suitable pull-up and filtering, then debounce the state transition
D. Set the pin to output-high and use its output latch as the switch state

56 A sensor is connected to NodeMCU pin D0, and the program attempts to attach an interrupt to detect changes. The interrupt never fires. What is the likely explanation?

configuring general purpose input output pins as input Hard
A. D0 maps to GPIO16, whose interrupt support is restricted
B. D0 is an analog-only pin and cannot be read digitally
C. D0 maps to GPIO0, which accepts interrupts only at 115200 baud
D. D0 maps to GPIO15, which is permanently held low after reset

57 An ESP32 design reads a signal on GPIO34 and attempts to enable an internal pull-up. The input remains unstable. Which hardware fact explains the result?

configuring general purpose input output pins as input Hard
A. GPIO34 is output-only and cannot be connected to an external signal
B. GPIO34 is reserved for the ESP32 flash interface on every module
C. GPIO34 through GPIO39 are input-only and lack internal pull-up or pull-down resistors
D. GPIO34 supports pull-up only when Bluetooth is enabled

58 A product requirement includes Wi-Fi, Bluetooth Low Energy, capacitive touch sensing, and two independent processor cores. Which platform satisfies the requirement without adding another wireless controller?

Comparison of ESP8266 and ESP32 Hard
A. ESP8266, because its single core supports all ESP32 peripheral modes
B. ESP8266, because its UART peripherals provide Bluetooth Low Energy
C. ESP32, because it integrates Wi-Fi, BLE, touch sensing, and dual cores
D. Neither platform, because Bluetooth and Wi-Fi cannot coexist in one module

59 A design uses GPIO34 for a status output after migrating from ESP8266 to ESP32. Compilation succeeds, but the status never changes. What migration issue is most likely?

Comparison of ESP8266 and ESP32 Hard
A. ESP32 GPIO34 requires 5 V before it can drive a logic level
B. ESP32 GPIO34 is reserved for UART0 transmission on all boards
C. ESP32 GPIO34 becomes output-capable only when Wi-Fi is disabled
D. ESP32 GPIO34 is input-only and cannot drive an output

60 An ESP8266 application is ported to ESP32 using the same numeric GPIO values, but the boot process becomes unreliable. Which investigation should occur first?

Comparison of ESP8266 and ESP32 Hard
A. Increase the ESP32 CPU frequency before reviewing the pin assignment
B. Replace all digital inputs with ADC channels to avoid boot-pin behavior
C. Assume ESP32 GPIO numbers always map physically to the same NodeMCU labels
D. Check whether the selected ESP32 pins have boot-strapping or flash-related constraints