Page 24 - Demo
P. 24
Q1. The LED is connected to pin number _____, which supports PWM.Answer: 9Q2. The button is connected to pin number _____.Answer: 2Q3. Each press of the button increases brightness by _____ units.Answer: 25Q4. When brightness crosses 255, it resets back to _____.Answer: 0 Match the FollowingColumn A (Code Element) Column B (Function)1. digitalRead(buttonPin) a. Sends PWM brightness to LED2. analogWrite(ledPin, brightness) b. Resets brightness to start again3. fadeAmount c. Reads button state (HIGH/LOW)4. if (brightness > 255) d. Defines step size of brightness changeAnswer Key:1 %u2192 c2 %u2192 a3 %u2192 d4 %u2192 b