The echo pin remains active for a duration related to the sound wave's travel time.
Incorrect! Try again.
8Why is the sound travel distance divided by 2 when calculating object distance?
Programming NodeMCU for Ultrasonic sensor
Easy
A.The sensor sends two separate trigger pulses
B.The NodeMCU reads two analog voltage values
C.The echo pin operates at twice the speed
D.The sound travels to the object and back
Correct Answer: The sound travels to the object and back
Explanation:
The measured time covers the outward and return journeys, so the one-way distance is half the total.
Incorrect! Try again.
9Which NodeMCU pin is typically used to read an analog temperature sensor?
programming temperature sensor
Easy
A.A0
B.RST
C.TX
D.D0
Correct Answer: A0
Explanation:
The A0 pin is the analog input used to read a varying sensor voltage.
Incorrect! Try again.
10Which Arduino function reads a value from an analog temperature sensor?
programming temperature sensor
Easy
A.delay()
B.analogRead()
C.digitalWrite()
D.pinMode()
Correct Answer: analogRead()
Explanation:
The analogRead() function reads the voltage level presented at an analog input.
Incorrect! Try again.
11What must usually be done to an analog temperature sensor's ADC reading to obtain temperature?
programming temperature sensor
Easy
A.Use it as a Wi-Fi password
B.Convert it using the sensor formula
C.Send it directly to the reset pin
D.Treat it as a digital output state
Correct Answer: Convert it using the sensor formula
Explanation:
The ADC value must be converted into voltage and then temperature using the sensor's specified relationship.
Incorrect! Try again.
12What is a common use of an IR sensor connected to a NodeMCU?
programming ir sensor
Easy
A.Storing program code
B.Detecting nearby objects
C.Producing ultrasonic waves
D.Measuring air humidity
Correct Answer: Detecting nearby objects
Explanation:
An IR sensor can detect an object by sensing reflected infrared light.
Incorrect! Try again.
13Which Arduino function commonly reads the digital output of an IR sensor?
programming ir sensor
Easy
A.WiFi.disconnect()
B.digitalRead()
C.Serial.begin()
D.analogWrite()
Correct Answer: digitalRead()
Explanation:
The digitalRead() function reads the HIGH or LOW state produced by a digital IR sensor module.
Incorrect! Try again.
14How should a NodeMCU pin connected to an IR sensor's digital output normally be configured?
programming ir sensor
Easy
A.As an output
B.As a serial transmitter
C.As a power supply
D.As an input
Correct Answer: As an input
Explanation:
The NodeMCU receives the IR module's output signal, so the connected GPIO pin is configured as an input.
Incorrect! Try again.
15Which sensor generally provides better measurement accuracy?
Compare DHT11 and DHT22
Easy
A.DHT11
B.DHT22
C.Neither measures accurately
D.Both are always identical
Correct Answer: DHT22
Explanation:
The DHT22 generally offers better temperature and humidity accuracy than the DHT11.
Incorrect! Try again.
16Which sensor generally supports a wider temperature measurement range?
Compare DHT11 and DHT22
Easy
A.Both have the same range
B.Neither measures temperature
C.DHT11
D.DHT22
Correct Answer: DHT22
Explanation:
The DHT22 supports a wider temperature range than the DHT11.
Incorrect! Try again.
17Which sensor is generally less expensive for basic temperature and humidity projects?
Compare DHT11 and DHT22
Easy
A.Neither is sold separately
B.DHT22
C.DHT11
D.Both always cost the same
Correct Answer: DHT11
Explanation:
The DHT11 is generally cheaper and is suitable for basic projects that do not require high accuracy.
Incorrect! Try again.
18What does an LDR sensor detect?
programming LDR sensor
Easy
A.Object distance
B.Sound intensity
C.Light intensity
D.Air pressure
Correct Answer: Light intensity
Explanation:
An LDR changes its resistance according to the amount of light falling on it.
Incorrect! Try again.
19How does an LDR's resistance normally change when light intensity increases?
programming LDR sensor
Easy
A.It increases
B.It becomes infinite
C.It decreases
D.It remains fixed
Correct Answer: It decreases
Explanation:
An LDR has lower resistance in brighter light and higher resistance in darkness.
Incorrect! Try again.
20Why is an LDR commonly connected in a voltage-divider circuit?
programming LDR sensor
Easy
A.To produce a measurable voltage
B.To measure relative humidity
C.To generate an ultrasonic pulse
D.To transmit data over Wi-Fi
Correct Answer: To produce a measurable voltage
Explanation:
A voltage divider converts the LDR's resistance change into a voltage that the NodeMCU can read.
Incorrect! Try again.
21A NodeMCU repeatedly receives NaN from dht.readTemperature(). What should the program do before using the returned value?
Programming NodeMCU for DHT11
Medium
A.Check the value with isnan()
B.Set the DHT pin to OUTPUT
C.Convert the value with String()
D.Multiply the value by 100
Correct Answer: Check the value with isnan()
Explanation:
DHT reads can fail because of timing or wiring issues. isnan() detects an invalid reading before it is processed or displayed.
Incorrect! Try again.
22A DHT11 is connected to NodeMCU pin D4. Which initialization is appropriate when using a common DHT sensor library?
Programming NodeMCU for DHT11
Medium
A.DHT dht(A0, DHT22);
B.DHT dht(A0, OUTPUT);
C.DHT dht(D4, INPUT);
D.DHT dht(D4, DHT11);
Correct Answer: DHT dht(D4, DHT11);
Explanation:
The DHT object must be initialized with the connected pin and the correct sensor type, which are D4 and DHT11 here.
Incorrect! Try again.
23A program reads a DHT11 every 100 ms and frequently reports invalid values. Which change is most appropriate?
Programming NodeMCU for DHT11
Medium
A.Decrease the interval to about 10 ms
B.Increase the interval to about 2 seconds
C.Change the data pin to analog mode
D.Call dht.begin() after every reading
Correct Answer: Increase the interval to about 2 seconds
Explanation:
The DHT11 has a slow sampling rate. Allowing roughly 2 seconds between reads reduces failures and repeated stale measurements.
Incorrect! Try again.
24A NodeMCU must activate a fan when the DHT11 temperature exceeds , but only when the reading is valid. Which condition is appropriate?
Programming NodeMCU for DHT11
Medium
A.if (!isnan(t) || t < 30)
B.if (!isnan(t) && t > 30)
C.if (isnan(t) && t > 30)
D.if (isnan(t) || t == 30)
Correct Answer: if (!isnan(t) && t > 30)
Explanation:
The condition first confirms that t is valid and then checks whether it exceeds the required threshold.
Incorrect! Try again.
25An HC-SR04 reports a round-trip echo time of . Using , what distance should the NodeMCU calculate?
Programming NodeMCU for Ultrasonic sensor
Medium
A.Approximately
B.Approximately
C.Approximately
D.Approximately
Correct Answer: Approximately
Explanation:
Substitution gives . Division by 2 accounts for the outward and return paths.
Incorrect! Try again.
26Which pulse sequence should the NodeMCU apply to the HC-SR04 trigger pin to begin a measurement?
Programming NodeMCU for Ultrasonic sensor
Medium
A.LOW for 1 second, then HIGH continuously
B.LOW briefly, HIGH for , then LOW
C.HIGH for 1 second, then LOW continuously
D.HIGH briefly, LOW for , then HIGH
Correct Answer: LOW briefly, HIGH for , then LOW
Explanation:
The HC-SR04 starts a measurement when its trigger input receives a HIGH pulse of approximately .
Incorrect! Try again.
27Why is a voltage divider commonly placed between the HC-SR04 echo pin and an ESP8266 NodeMCU input?
Programming NodeMCU for Ultrasonic sensor
Medium
A.To stabilize the ultrasonic frequency
B.To convert echo data into analog data
C.To increase the trigger pulse duration
D.To reduce the 5 V echo level
Correct Answer: To reduce the 5 V echo level
Explanation:
The HC-SR04 echo output can reach 5 V, while ESP8266 GPIO pins use 3.3 V logic. A divider protects the input by lowering the voltage.
Incorrect! Try again.
28What is the main benefit of adding a timeout to pulseIn(echoPin, HIGH, timeout)?
Programming NodeMCU for Ultrasonic sensor
Medium
A.It increases the sensor's maximum range
B.It converts the result directly to centimeters
C.It prevents indefinite waiting for an echo
D.It removes the need for a trigger pulse
Correct Answer: It prevents indefinite waiting for an echo
Explanation:
A timeout lets the program continue when no echo arrives, such as when an object is absent or outside the measurable range.
Incorrect! Try again.
29An LM35 produces per degree Celsius. If its measured output is , what temperature should the NodeMCU report?
programming temperature sensor
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The temperature is .
Incorrect! Try again.
30A temperature sensor connected to A0 produces noticeably fluctuating values. Which software technique can provide a steadier displayed temperature?
programming temperature sensor
Medium
A.Alternate A0 between input and output
B.Average several consecutive ADC readings
C.Replace analogRead() with digitalRead()
D.Restart the NodeMCU after each reading
Correct Answer: Average several consecutive ADC readings
Explanation:
Averaging multiple ADC samples reduces the effect of short-term electrical noise and produces a more stable displayed value.
Incorrect! Try again.
31A NodeMCU development board has a documented A0 full-scale voltage of . If analogRead(A0) returns 512 on its 10-bit ADC, what input voltage is approximately present?
programming temperature sensor
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Using , the estimated input is approximately .
Incorrect! Try again.
32An active-LOW IR obstacle module outputs LOW when an object is detected. Which condition should control an alarm correctly?
programming ir sensor
Medium
A.if (analogRead(irPin) == LOW)
B.if (digitalRead(irPin) == LOW)
C.if (digitalWrite(irPin) == LOW)
D.if (digitalRead(irPin) == HIGH)
Correct Answer: if (digitalRead(irPin) == LOW)
Explanation:
For an active-LOW module, a LOW digital input represents detection, so the alarm condition must test for LOW.
Incorrect! Try again.
33An IR obstacle sensor causes an event counter to increase many times while one object remains in front of it. Which program change best counts each new detection once?
programming ir sensor
Medium
A.Configure the sensor pin as an output
B.Reset the counter whenever input is inactive
C.Count only on the inactive-to-active transition
D.Count continuously while the input is active
Correct Answer: Count only on the inactive-to-active transition
Explanation:
Edge detection compares the current and previous sensor states, allowing one count when an object first enters the detection region.
Incorrect! Try again.
34An IR module's indicator LED responds to an object, but the NodeMCU always reads HIGH. What should be checked first?
programming ir sensor
Medium
A.Whether the ADC reference is set to 5 V
B.Whether the module and NodeMCU share ground
C.Whether the Wi-Fi connection is disabled
D.Whether the serial baud rate is increased
Correct Answer: Whether the module and NodeMCU share ground
Explanation:
The digital signal requires a common voltage reference. Without a shared ground, the NodeMCU may not interpret the module's output correctly.
Incorrect! Try again.
35A greenhouse must measure temperatures below and requires better humidity accuracy. Which sensor is generally more suitable?
Compare DHT11 and DHT22
Medium
A.DHT22, because it has a wider range
B.DHT11, because it uses an analog output
C.DHT11, because it samples more slowly
D.DHT22, because it requires no data pin
Correct Answer: DHT22, because it has a wider range
Explanation:
The DHT22 generally supports subzero temperatures and offers better humidity accuracy than the DHT11.
Incorrect! Try again.
36A program is changed from a DHT11 to a DHT22 while keeping the same data pin. Which code change is normally required?
Compare DHT11 and DHT22
Medium
A.Change the GPIO mode to analog input
B.Convert the data pin into a serial port
C.Change the declared sensor type to DHT22
D.Replace the data wire with two data wires
Correct Answer: Change the declared sensor type to DHT22
Explanation:
Both sensors can use the same style of digital interface, but the library must know the correct model to decode its data properly.
Incorrect! Try again.
37Which design trade-off correctly compares the DHT11 and DHT22?
Compare DHT11 and DHT22
Medium
A.DHT11 is more accurate; DHT22 is analog
B.DHT11 reads subzero; DHT22 reads digital only
C.DHT11 has wider range; DHT22 is cheaper
D.DHT11 is cheaper; DHT22 is more accurate
Correct Answer: DHT11 is cheaper; DHT22 is more accurate
Explanation:
The DHT11 is commonly selected for lower cost and basic measurements, while the DHT22 provides wider ranges and better accuracy.
Incorrect! Try again.
38An LDR is connected from 3.3 V to A0, and a fixed resistor is connected from A0 to ground. What generally happens to the ADC reading as light intensity increases?
programming LDR sensor
Medium
A.It decreases because the LDR resistance decreases
B.It increases because the LDR resistance decreases
C.It remains fixed because A0 is digital
D.It alternates because the LDR produces pulses
Correct Answer: It increases because the LDR resistance decreases
Explanation:
With this divider arrangement, more light lowers the upper LDR resistance, moving the A0 voltage closer to 3.3 V and increasing the ADC reading.
Incorrect! Try again.
39A streetlight controlled by an LDR rapidly switches on and off near the threshold. Which programming approach best prevents this behavior?
programming LDR sensor
Medium
A.Use one threshold with no delay
B.Change A0 to a digital output
C.Use separate ON and OFF thresholds
D.Set the ADC reading to zero
Correct Answer: Use separate ON and OFF thresholds
Explanation:
Separate thresholds add hysteresis. The light can turn on at one reading and turn off at another, preventing rapid switching near a single boundary.
Incorrect! Try again.
40An LDR divider gives readings of 180 in darkness and 820 in bright light. Which condition appropriately turns an LED on when the environment becomes dark?
programming LDR sensor
Medium
A.if (ldrValue > 700)
B.if (ldrValue == 820)
C.if (ldrValue < 300)
D.if (ldrValue >= 1023)
Correct Answer: if (ldrValue < 300)
Explanation:
The measured dark value is near 180, so a threshold below 300 distinguishes dark conditions from the much higher bright-light reading.
Incorrect! Try again.
41A NodeMCU reads a DHT11 every 100 ms, but many readings become NaN and the output occasionally freezes. Which change best addresses both problems?
Programming NodeMCU for DHT11
Hard
A.Use a 100 ms interval and increase serial speed
B.Use a 50 ms interval and repeat the failed request immediately
C.Use a 2-second interval and validate the returned value
D.Use a 500 ms interval and remove the pull-up resistor
Correct Answer: Use a 2-second interval and validate the returned value
Explanation:
The DHT11 requires roughly a 1 to 2 second sampling interval. The program should also test whether the reading is valid before using or displaying it.
Incorrect! Try again.
42A DHT11 data line is connected to a NodeMCU GPIO configured incorrectly as an analog input. The sensor is powered correctly, but readings fail. What is the most appropriate correction?
Programming NodeMCU for DHT11
Hard
A.Configure the GPIO as a PWM output at 50 percent duty cycle
B.Configure the GPIO as a digital output driven permanently high
C.Configure the GPIO as an analog input with averaging
D.Configure the GPIO as a digital bidirectional data pin
Correct Answer: Configure the GPIO as a digital bidirectional data pin
Explanation:
DHT11 communication uses timed digital signaling on a single data wire. The pin must support the library's input and output transitions, usually with a pull-up resistor.
Incorrect! Try again.
43A DHT11 system reports a humidity value of 0 after a communication failure, and the control program turns on a humidifier. Which design prevents this unsafe response?
Programming NodeMCU for DHT11
Hard
A.Use an explicit validity flag before applying the reading
B.Treat a zero reading as maximum humidity
C.Replace every failed reading with the previous value
D.Convert the value to an integer before comparison
Correct Answer: Use an explicit validity flag before applying the reading
Explanation:
A failed sensor transaction must be distinguished from a genuine measurement. The actuator should be controlled only when the library reports a valid reading.
Incorrect! Try again.
44An HC-SR04 is connected to a 3.3 V NodeMCU. Which hardware and software combination is safest for the Echo signal?
Programming NodeMCU for Ultrasonic sensor
Hard
A.Connect Echo to A0 and calculate distance from ADC counts
B.Use a pull-down resistor and measure the trigger voltage
C.Connect Echo directly and wait without a timeout
D.Use a voltage divider and a bounded pulse-duration measurement
Correct Answer: Use a voltage divider and a bounded pulse-duration measurement
Explanation:
The HC-SR04 Echo output can be 5 V, so level reduction protects the ESP8266 input. A timeout prevents the program from blocking when no echo returns.
Incorrect! Try again.
45An ultrasonic measurement returns a pulse duration of 5800 microseconds. Assuming a sound speed of , what distance should be reported?
Programming NodeMCU for Ultrasonic sensor
Hard
A.49.9 cm
B.16.7 cm
C.99.6 cm
D.198.9 cm
Correct Answer: 99.6 cm
Explanation:
The pulse represents a round trip, so distance is .
Incorrect! Try again.
46A robot uses two ultrasonic sensors mounted close together and triggers them simultaneously. Measurements are inconsistent even when the robot is stationary. What is the best software correction?
Programming NodeMCU for Ultrasonic sensor
Hard
A.Increase the Echo voltage to improve sound reflection
B.Trigger sensors sequentially with acoustic settling time
C.Trigger both sensors continuously at a higher frequency
D.Average simultaneous readings without changing timing
Correct Answer: Trigger sensors sequentially with acoustic settling time
Explanation:
One sensor can detect the other sensor's acoustic pulse. Sequential triggering with sufficient separation reduces cross-talk and false echoes.
Incorrect! Try again.
47A distance function occasionally returns an extremely large value when the target is absent. Which implementation detail most directly prevents this result from being interpreted as a real distance?
Programming NodeMCU for Ultrasonic sensor
Hard
A.Multiply the duration by the measured supply voltage
B.Convert the unsigned duration to a larger integer type
C.Return an invalid marker when the Echo timeout expires
D.Use a longer trigger pulse for every measurement
Correct Answer: Return an invalid marker when the Echo timeout expires
Explanation:
A timeout means no usable echo was measured. Returning a distinct invalid status allows the application to reject the sample instead of converting an undefined duration.
Incorrect! Try again.
48A temperature sensor is connected to the ESP8266 ADC, whose input range is 0 to 1.0 V, but the sensor can output up to 3.0 V. What is the correct engineering response?
programming temperature sensor
Hard
A.Increase the sensor output using a series resistor
B.Read the ADC directly and divide the result by three
C.Add suitable scaling and calibrate the conversion equation
D.Configure the digital pin mode to extend the ADC range
Correct Answer: Add suitable scaling and calibrate the conversion equation
Explanation:
A voltage divider or conditioning circuit must keep the ADC input within its rated range. The temperature conversion must then account for that scaling and calibration.
Incorrect! Try again.
49For an LM35 connected to a 10-bit ADC with a 1.0 V reference, which equation converts an ADC count to temperature in degrees Celsius, assuming 10 mV per degree Celsius?
programming temperature sensor
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The ADC voltage is volts. Since the LM35 produces volts per degree Celsius, multiplying the voltage by gives temperature.
Incorrect! Try again.
50A temperature control loop switches a heater rapidly when measurements fluctuate by 0.2 degrees Celsius near the setpoint. Which programming strategy best reduces actuator chatter while preserving responsiveness?
programming temperature sensor
Hard
A.Apply filtered readings with hysteresis around the setpoint
B.Use the rawest reading and increase loop frequency
C.Round every reading down before comparing it
D.Ignore all readings that differ from the previous one
Correct Answer: Apply filtered readings with hysteresis around the setpoint
Explanation:
Filtering reduces noise, while hysteresis creates separate turn-on and turn-off thresholds. Together they prevent rapid switching caused by small measurement variations.
Incorrect! Try again.
51An IR obstacle module has an active-low digital output. The program currently treats HIGH as obstacle detected, causing the actuator logic to invert. What is the correct fix?
programming ir sensor
Hard
A.Interpret LOW as detection and document the polarity
B.Enable PWM so the output contains more detection information
C.Use analogRead instead of reading the digital output
D.Invert the sensor supply and keep the software unchanged
Correct Answer: Interpret LOW as detection and document the polarity
Explanation:
Active-low sensors assert detection by pulling the output low. The software must match the module's actual output polarity.
Incorrect! Try again.
52An IR sensor output rapidly alternates between detected and clear when an object is near its threshold. Which algorithm is most suitable for stable event detection?
programming ir sensor
Hard
A.Increase the serial baud rate during each transition
B.Replace digital sampling with a fixed delay of one minute
C.Use the first transition and ignore all later states
D.Use debouncing or consecutive-sample confirmation
Correct Answer: Use debouncing or consecutive-sample confirmation
Explanation:
Threshold noise can cause rapid transitions. Requiring a stable state for several samples or a defined time prevents false events without making the system unresponsive.
Incorrect! Try again.
53An IR receiver is used to decode a remote-control protocol, but decoding fails whenever the main loop performs a long blocking delay. Which redesign is most appropriate?
programming ir sensor
Hard
A.Poll the receiver only after the frame transmission ends
B.Capture signal timing with interrupts or a nonblocking decoder
C.Increase the delay so complete frames arrive together
D.Read the receiver through the ultrasonic Echo pin
Correct Answer: Capture signal timing with interrupts or a nonblocking decoder
Explanation:
IR protocols encode information in timing intervals that can be missed during blocking delays. Interrupt-based or nonblocking capture preserves the edge timing.
Incorrect! Try again.
54A project requires temperature resolution near 0.1 degrees Celsius and humidity measurements below 20 percent relative humidity. Which sensor choice is technically better?
Compare DHT11 and DHT22
Hard
A.DHT11, because its protocol supports faster continuous sampling
B.DHT22, because it offers finer resolution and a wider range
C.DHT22, because it does not require timing restrictions
D.DHT11, because lower resolution improves measurement stability
Correct Answer: DHT22, because it offers finer resolution and a wider range
Explanation:
DHT22 generally provides approximately 0.1 degree Celsius and 0.1 percent relative humidity resolution, with broader operating ranges than DHT11.
Incorrect! Try again.
55A DHT11 library is used with a DHT22, and the program reports implausible but checksum-valid values. Which cause is most likely?
Compare DHT11 and DHT22
Hard
A.The sensor type parameter uses the wrong data decoding format
B.The NodeMCU ADC reference is too low for the sensor
C.The DHT22 requires an analog rather than digital GPIO
D.The humidity value must be calculated from the supply current
Correct Answer: The sensor type parameter uses the wrong data decoding format
Explanation:
DHT11 and DHT22 use different data representations and resolutions. The library must be configured for the actual sensor model.
Incorrect! Try again.
56A data logger samples both a DHT11 and a DHT22 every 250 ms. Which statement best predicts the resulting behavior?
Compare DHT11 and DHT22
Hard
A.Both may produce failures because their minimum intervals are longer
B.Only the DHT22 will fail because it has lower humidity resolution
C.Only the DHT11 will fail because the DHT22 has no interval limit
D.Both will work if the serial monitor is set above 115200 baud
Correct Answer: Both may produce failures because their minimum intervals are longer
Explanation:
These sensors require relatively slow sampling, commonly about one reading per second for DHT22 and roughly one to two seconds for DHT11. A 250 ms interval is too short.
Incorrect! Try again.
57An LDR and a fixed resistor form a divider connected to A0. The LDR is placed between 3.3 V and the ADC input, and its resistance decreases in bright light. What happens to the ADC reading as light increases?
programming LDR sensor
Hard
A.The ADC reading becomes negative because the divider reverses polarity
B.The ADC reading decreases because the LDR resistance falls
C.The ADC reading increases because the divider output rises
D.The ADC reading remains fixed because an LDR is digital
Correct Answer: The ADC reading increases because the divider output rises
Explanation:
With the LDR as the upper resistor, the output is . Decreasing increases the output voltage.
Incorrect! Try again.
58An LDR threshold works in the laboratory but fails after deployment because the NodeMCU supply voltage varies. Which software or hardware improvement gives the most robust light classification?
programming LDR sensor
Hard
A.Replace every ADC value with the maximum possible count
B.Use a longer digital pulse on the LDR output
C.Use a ratio-based threshold or a regulated ADC reference
D.Increase the threshold whenever the light level changes
Correct Answer: Use a ratio-based threshold or a regulated ADC reference
Explanation:
Divider measurements depend on the supply and ADC reference. Normalizing the reading to the reference or stabilizing that reference makes thresholds less sensitive to supply variation.
Incorrect! Try again.
59An LDR reading is noisy because the sensor wire runs beside a relay cable. Which combination best improves the measurement without hiding genuine light changes?
programming LDR sensor
Hard
A.Increase the ADC input voltage beyond its rated limit
B.Use short shielded wiring, averaging, and a modest low-pass filter
C.Use maximum averaging and a delay of several minutes
D.Change the LDR divider to a digital output pin
Correct Answer: Use short shielded wiring, averaging, and a modest low-pass filter
Explanation:
Reducing coupled interference at the wiring level and applying appropriately limited filtering improves signal quality while retaining useful changes in illumination.
Incorrect! Try again.
60A NodeMCU LDR application must detect a sudden light interruption while also reporting a stable ambient level. Which architecture best satisfies both requirements?
programming LDR sensor
Hard
A.Use only the minimum ADC value collected since startup
B.Maintain a filtered baseline and compare raw samples to it
C.Report only the instantaneous ADC value to both functions
D.Apply a long moving average and discard all raw samples
Correct Answer: Maintain a filtered baseline and compare raw samples to it
Explanation:
A filtered baseline represents ambient illumination, while raw or lightly filtered samples preserve fast interruptions. Comparing the two supports both stable reporting and event detection.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →