Page 19 - Demo
P. 19


                                    %u2022 Loops & conditions to reverse fading direction.%u2022 Practical use of PWM for light intensity control. Practice Questions %u2013 Project 5 (LED Fading Effect) Multiple Choice Questions (MCQs)Q1. Which Arduino function is used to control LED brightness?a) digitalWrite()b) analogWrite()c) pinMode()d) delay()Answer: b) analogWrite()Q2. What happens when brightness reaches 255 in the code?a) LED turns offb) LED blinksc) Fading direction reversesd) Code stops runningAnswer: c) Fading direction reversesQ3. Which variable decides how fast the LED brightness changes?a) ledPinb) brightnessc) fadeAmountd) delay()Answer: c) fadeAmountQ4. What is the role of delay(30); in this project?a) Stops the LED from glowingb) Slows down brightness change for smooth fadingc) Makes LED blinkd) Turns LED off after 30 secondsAnswer: b) Slows down brightness change for smooth fading Fill in the BlanksQ1. The LED is connected to pin number _____, which supports PWM.Answer: 9Q2. The variable _____ stores the current brightness value.Answer: brightness
                                
   13   14   15   16   17   18   19   20   21   22   23

 

 

 

 

 

Web hosting by Somee.com