Using PWM to Control Lights

Introduction: Using PWM to Control Lights

Hi guys,
In this project I am going to tell how you can use PWM to control LED's.


For this project you need,
1. Arduino UNO (you can use any simillar boards you like)
2. Led
3. Some jumper wires

Step 1: Circuit Description.

First we need to connect the LED's cathode pin to the gnd pin of arduino. Then we will connect the anode to the pin 5 of arduino. Now we are all done with the circuits.

Step 2: Coding.

Now just connect your arduino to your computer and just paste this code in your arduino ide and hit the upload button.
The code is here:
int a = 6;
void setup()

void loop()
for(int p = 0; p <= 255; p = p+2)
for(int p = 255; p >= 0; p = p-2)

Be the First to Share


    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make it Glow Contest

      Make it Glow Contest
    • Baking Contest

      Baking Contest