filmov
tv
Arduino LED fading with code

Показать описание
In this tutorial we are going to show, how to fade an LED using Arduino…
This is so easy as reading A B C D in early school. Here we will know the use of analogWrite() function in Arduino which uses PWM (Pulse Width Modulation) feature to make the effect.
Required components:
Arduino UNO
LED
220 ohm resistor
connectors
Steps
1. Connect the positive (longer) leg of LED to output pin 9 via a 220 ohm resistor and negative (shorter) to GND.
2. Compile the given arduino code & upload it to the board.
3. If successfully uploaded, LED will start fading.
This is so easy as reading A B C D in early school. Here we will know the use of analogWrite() function in Arduino which uses PWM (Pulse Width Modulation) feature to make the effect.
Required components:
Arduino UNO
LED
220 ohm resistor
connectors
Steps
1. Connect the positive (longer) leg of LED to output pin 9 via a 220 ohm resistor and negative (shorter) to GND.
2. Compile the given arduino code & upload it to the board.
3. If successfully uploaded, LED will start fading.