The Supplies and the hardware setup will be exactly the same as those mentioned in the first program - 01. Blink.
Supplies:
- LED
- Arduino Uno R3
- Resistor - 220 Ω
- Solderless Breadboard
- Jumper wires
Setting up your hardware
In this project, you must connect the anode of LED to a PWM (Pulse Width Modulation) pin. PWM pins are the ones that have '~' next to the numbers.
In Arduino Uno, the PWM pins are:
- D3
- D5
- D6
- D9
- D10
- D11
Connections:
- Cathode ---> GND (Ground)
- Anode ---> D9
Coding
You can find the codes for this project in:
File---> Examples---> 01.Basic---> Fade
Make sure to modify the codes to make it compatible with the hardware setup.
The final look of the codes:
Compile the sketch and upload it to the Arduino Board.
Final Look
If anyone has any questions, please feel free to comment below or send an email to arduinoprojectsbyr@gmail.com.
Comments
Post a Comment