Bird
0
0

A developer wrote this bare-metal code to blink an LED and read a sensor but the LED never blinks. What is the likely problem? void loop() { readSensor(); blinkLED(); } Options:

medium📝 Debug Q6 of 15
FreeRTOS - RTOS Fundamentals
A developer wrote this bare-metal code to blink an LED and read a sensor but the LED never blinks. What is the likely problem? void loop() { readSensor(); blinkLED(); } Options:
AblinkLED() is called before readSensor()
BreadSensor() blocks indefinitely, preventing blinkLED()
CThe loop function is missing a return statement
DLED hardware is not connected
Step-by-Step Solution
Solution:
  1. Step 1: Analyze function order and blocking

    If readSensor() blocks or takes too long, blinkLED() never executes.
  2. Step 2: Check other options

    Calling order is correct; return statement not needed in void; hardware issue not given.
  3. Final Answer:

    readSensor() blocks indefinitely, preventing blinkLED() -> Option B
  4. Quick Check:

    Blocking function causes no LED blink = A [OK]
Quick Trick: Blocking functions stop later code from running [OK]
Common Mistakes:
  • Ignoring blocking behavior
  • Thinking function order causes issue
  • Assuming hardware problem without evidence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes