Page 21 - Demo
P. 21


                                     Project 6: Button + Fading LED (User-controlled Brightness)Difficulty Level: Intermediate Components RequiredComponent Quantity DescriptionArduino Uno 1 Main microcontroller boardLED (any color) 1 Output deviceResistor 1 220%u03a9 (LED protection)Push Button 1 Input deviceResistor 1 10k%u03a9 (for pull-down on button)Breadboard 1 For connectionsJumper Wires 6%u20138 To connect components Circuit Schematic%u2022 LED anode (+) %u2192 Arduino pin 9 (PWM) %u2192 through 220%u03a9 resistor %u2192 GND.%u2022 Button one side %u2192 Arduino pin 2.%u2022 Button other side %u2192 5V.%u2022 A 10k%u03a9 resistor connects pin 2 to GND (pull-down). Arduino Code
                                
   15   16   17   18   19   20   21   22   23   24   25

 

 

 

 

 

Web hosting by Somee.com