Using analogWrite
- Not only can you blink LED, dimming LED is also possible.
- Depending on the Arduino you have, the number of pin that supports native output PWM varies.
Pre-requisite:
- Finished Add an external LED and, another button
- Basic circuit knowledge
Objectives:
- Dim the LED
Descriptions:
- You already know how to connect an LED to the Arduino board.
- This time, you need to connect the LED the same way but into different output number that supports PWM( what is this ) output
In other word, with "~" by the side of the number of PIN. Let's connect the LED to pin 9 as refer to : http://arduino.cc/en/Tutorial/Fade
PWM is "Pulse-width modulation", please refer to : http://arduino.cc/en/Tutorial/PWM