Recall & Review
beginner
What is the main purpose of the first embedded program that blinks an LED?
To verify that the microcontroller and development setup are working correctly by turning an LED on and off repeatedly.
Click to reveal answer
beginner
In embedded C, which function usually contains the code that runs repeatedly?
The
main() function contains the setup and the infinite loop where the LED blinking code runs repeatedly.Click to reveal answer
beginner
Why do we use a delay in an LED blink program?
The delay creates a visible pause so the LED stays on or off long enough for us to see the blinking effect.
Click to reveal answer
beginner
What does setting a microcontroller pin as output mean?
It means the pin can send voltage out to power devices like an LED, instead of just reading signals.
Click to reveal answer
beginner
What is the role of the infinite loop in an embedded LED blink program?
It keeps the program running forever, so the LED keeps blinking continuously without stopping.
Click to reveal answer
What is the first step to make an LED blink on a microcontroller?
✗ Incorrect
To control an LED, the microcontroller pin must be set as output to send voltage to the LED.
Why do we need a delay between turning the LED on and off?
✗ Incorrect
Without delay, the LED would blink too fast to see. Delay slows it down so we can notice the blinking.
Which part of the program runs repeatedly to keep the LED blinking?
✗ Incorrect
The infinite loop inside main() runs forever, toggling the LED on and off.
What happens if you forget to set the pin as output before blinking the LED?
✗ Incorrect
If the pin is not set as output, it cannot send voltage to the LED, so the LED stays off.
What is the simplest way to turn an LED on in embedded C?
✗ Incorrect
Setting the output pin HIGH sends voltage to the LED, turning it on.
Describe the basic steps to write a program that blinks an LED on a microcontroller.
Think about how to control the LED pin and make the blinking visible.
You got /6 concepts.
Explain why an infinite loop is necessary in an embedded LED blink program.
Consider what happens if the program stops after one blink.
You got /3 concepts.