Arduino tutorial - #5 – Fade an LED
By using a PWM pin on the Arduino, you will be able to increase and decrease the
intensity of brightness of an LED.
Parts Needed
(1) Arduino Uno
(1) USB A-to-B Cable
(1) Breadboard – Half Size
(1) LED 5mm
(1) 220 Ω Resistor
(2) Jumper Wires
Before you can start working
with Arduino, you need to make sure you have the Arduino IDE software installed on your computer.
This program allows you to
write, view, and upload the code to
your Arduino Uno board.
You can download the IDE for
free on
Arduino’s website.
Once the IDE is installed, you will need to
connect your Arduino to your computer.
To do this, plug one end of the USB cable into the Arduino Uno
and then the other end of the
USB into your computer’s USB port.
Select The Board
Once the board is
plugged in, you will need to open the IDE and click on Tools
> Board >
Arduino Uno to select the board.
Select Serial Port
Next, you have to tell the Arduino which port you are using on
your computer.
To select the port, go to Tools > Port and then
select the port that says, Arduino.
Project Diagram
Project Code
1. Connect the Arduino board to your computer using the USB
cable.
2. Open project code – Circuit_05_Fade
Use the link
below to download the zip folder containing the code.
Download
Project Code
Once
the file has been downloaded, you will need to unzip/extract the folder in
order to use it.
3. Select the board and serial port as outlined in an earlier
section.
4. Click the upload button to send the sketch to Arduino.
If you have a shortage
of the equipment used in this article, do not hesitate to buy it from one of my
private links there are good deals,(Amazon or Gearbest, or Aliexpress),
from the sidebar icons
below Social icons in this page,
And do not worry,
there will be no extra cost, it will remain the same price,
Just please make sure
to add your product to site's
(shopping card ) if
you need some time before completing your purchase :)
Thank you for your good attention,
if you enjoy this tutorial please share this Page link on your social
account(s), and please join my social page(s) for more like this.
Join the conversation