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. STM32F103
B. ESP8266
C. ATmega328P
D. RP2040

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

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

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

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

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

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

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. Blender
D. Audacity

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

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

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. File > Open
D. Edit > Copy

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 change the CPU architecture
C. To select the GPIO voltage
D. To identify the connected board

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

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

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

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

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

serial port programming Easy
A. Baud rate
B. Pin voltage
C. Wi-Fi channel
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. pinMode(ledPin, INPUT);
B. analogRead(ledPin);
C. pinMode(ledPin, OUTPUT);
D. digitalRead(ledPin);

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

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

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. analogWrite(buttonPin, LOW);
B. digitalWrite(buttonPin, HIGH);
C. pinMode(buttonPin, OUTPUT);
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. digitalRead()
C. pinMode()
D. Serial.begin()

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

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

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

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

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

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

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. Both support Wi-Fi
C. Only ESP32 supports Wi-Fi
D. Neither supports 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 ADC pin
B. The UART TX pin
C. A digital GPIO pin
D. The USB connector

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. Both interfaces can be supported using suitable GPIO pins
B. Only the SPI display can be connected to NodeMCU
C. Neither interface is supported by the NodeMCU board
D. Only the I2C sensor can be connected to NodeMCU

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. NodeMCU GPIO pins can safely accept any voltage below
C. The USB cable determines the voltage of every connected peripheral
D. GPIO pins automatically increase their voltage for every peripheral

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. Replace the ESP8266 with an ESP32 processor
B. Install the driver for the board's USB-to-serial converter
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. Install or correctly reference the required library
B. Set the sensor pins as analog outputs
C. Format the NodeMCU flash memory manually
D. Change the sensor connection from I2C to UART

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 ADC input voltage is outside its normal range
B. The connected sensor is using an unsupported color wire
C. The wrong serial port was selected or another program is using it
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 Serial Monitor baud rate
B. The GPIO pull-up resistance only
C. The board's analog reference temperature
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 can flood the serial buffer and make output difficult to process
B. It permanently converts UART pins into analog inputs
C. It disables the USB driver after exactly ten messages
D. It prevents the processor from executing any machine instructions

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 USB connector as a replacement for every GPIO function
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 reset pin as a continuous data output

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 and write HIGH
C. Configure the pin as OUTPUT and write HIGH
D. Configure the pin as INPUT_PULLUP and write LOW

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 ADC resolution must be reduced to one bit
B. The pin may not have been configured as an output
C. The serial monitor baud rate must be doubled
D. The board must be powered through the GPIO pin

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 limits current through the LED and protects the GPIO
B. It allows the GPIO to safely provide unlimited current
C. It changes the LED into a digital input device
D. It increases the GPIO voltage above the supply voltage

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. Connect the relay coil directly to the GPIO
C. Tie the relay coil directly between two input pins
D. Drive a transistor or relay module from 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. A continuously changing analog value
B. HIGH
C. LOW
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 output pin is receiving too much serial data
B. The USB cable is converting every LOW into HIGH
C. The ADC is forcing the input to alternate states
D. The input is floating without a defined logic level

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. Disconnect the ground connection to remove signal loading
C. Check the sensor supply, common ground, wiring, and signal voltage
D. Configure the GPIO as an analog output instead

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. Read the button only through the ADC without filtering
C. Debounce the input by requiring a stable state for a short interval
D. Disable the ground connection during the transition

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. ESP32
C. A USB-to-serial adapter alone
D. ESP8266

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. A serial cable without a microcontroller
C. A single digital logic gate
D. ESP8266

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 software I2C, hardware SPI, and the second UART only
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 UART0 for I2C, GPIO16 for SPI clock, and UART1 for GPS

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 can be used only when the Wi-Fi radio is disabled
B. They are permanently connected to the USB-to-serial converter
C. They are reserved for the module's external SPI flash interface
D. They are analog-only pins with no digital output capability

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 NodeMCU board converts all input signals to 1.8 V
B. The GPIO input requires an external crystal oscillator
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. Connect the sensor ground first, then select the ESP32 board profile
B. Change the sketch delay, then replace the ESP8266 core
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 the correct ESP8266 board profile and reduce upload speed
B. Replace every digitalWrite() call with analogWrite() before uploading
C. Select an ESP32 profile and increase serial monitor baud rate
D. Increase sensor sampling frequency and disable GPIO pull-ups

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. Use a separate relay supply, common the grounds, and add proper flyback protection
C. Configure the relay GPIO as an analog input and increase the baud rate
D. Power the relay from the ESP8266 3.3 V pin and remove the ground connection

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 serial monitor is decoding SPI traffic as UART traffic
B. The bootloader and application are using different intentional baud configurations
C. The UART hardware is defective and must be replaced
D. The ESP8266 changes its CPU architecture after uploading

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. Increase the GPIO drive strength on the UART pins
B. Add packet framing, a length or delimiter field, and validation
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. Change GPS data from UART to I2C without changing the receiver
B. Increase the GPS supply voltage to compensate for serial contention
C. Use GPIO16 as a second full-duplex UART without additional software support
D. Move diagnostics to a separate interface or disable them during GPS reception

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. GPIO0 must be low while the chip is reset
B. GPIO16 must be low while the chip is reset
C. GPIO0 must be high while the chip is reset
D. GPIO2 must alternate rapidly 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 HIGH to turn the LED on
B. Set GPIO5 as INPUT; write HIGH to turn the LED on
C. Set GPIO5 as INPUT_PULLUP; write LOW to turn the LED on
D. Set GPIO5 as OUTPUT; write LOW 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. Use a boot-strap-compatible default state and add external biasing
B. Drive the pin immediately after setup() and ignore reset behavior
C. Use GPIO6 because flash pins have a fixed safe startup state
D. Replace the digital output with an ADC measurement

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 has special limitations and is not a general PWM-capable pin
C. GPIO16 is reserved exclusively for UART0 receive
D. GPIO16 can generate PWM only when configured as an analog input

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_PULLUP and treat LOW as pressed
B. Configure GPIO4 as INPUT_PULLDOWN and treat HIGH as pressed
C. Configure GPIO4 as INPUT and leave the button disconnected
D. Configure GPIO4 as OUTPUT and drive it high while reading it

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. Remove the pull resistor so the cable can settle at its natural voltage
B. Increase the UART baud rate and sample the switch only after Wi-Fi transmission
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 GPIO15, which is permanently held low after reset
B. D0 is an analog-only pin and cannot be read digitally
C. D0 maps to GPIO16, whose interrupt support is restricted
D. D0 maps to GPIO0, which accepts interrupts only at 115200 baud

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 supports pull-up only when Bluetooth is enabled
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 is output-only and cannot be connected to an external signal

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. Neither platform, because Bluetooth and Wi-Fi cannot coexist in one module
B. ESP32, because it integrates Wi-Fi, BLE, touch sensing, and dual cores
C. ESP8266, because its single core supports all ESP32 peripheral modes
D. ESP8266, because its UART peripherals provide Bluetooth Low Energy

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. Check whether the selected ESP32 pins have boot-strapping or flash-related constraints
B. Replace all digital inputs with ADC channels to avoid boot-pin behavior
C. Increase the ESP32 CPU frequency before reviewing the pin assignment
D. Assume ESP32 GPIO numbers always map physically to the same NodeMCU labels