• 1 x Arduino Uno ( You can use other boards also )
  • 10 x Jumper Wires M-F
  • 3 x 10k resistor
  • 1 x Breadboard
  • 2 x  RGB LED
  • 1 x potentiometer

Image result for rgb led

Description

Through this project, we can learn how input of potentiometer can control output at digital pins

Quick points

  • This is a basic program to check Board is working with any sensor (Potentiometer).
  • You have two types of RGB Led
    • Cathod as common
    • Anode as common

Min Required  – 20 mins

Lines of Code –

Procedure

  1. Take Breadboard
  2. Take RGB LED it will have one big leg (+) which is a positive and other 3 legs which is Negative.(this RGB as common anode based , and if small leg is there which is negative it is RGB as common cathode).
  3. Press that all legs and remember which one is a big one ( You can even bend big leg so it’s easy to identify for further reference.
  4. Now take 2 M-M jumper wires and potentiometer.
  5. Fix them to connected line with RGB LED and potentiometer on breadboard  ( To understand more about Breadboard connection click here )
  6. Now Jumper wire connected to the Bigger leg which is positive will go to arduino pin and Small legs which are Negative goes to the GND ( 3 GND is available in Arduino UNO).
  7. Check once again and connect resistors  with LED  to avoid any short circuit.
  8. Connect Arduino to your Laptop/PC by USB Cable.( we use A to B USB cable for Arduino which is also used in printers )
  9. Open Arduino IDE ( You can download it from here or you can use online platform Arduino Web editor )
  10. Go to File > Examples > Basic > controlling LED color using potentiometer.
  11. Check program, save it and then upload it.
  12. You can change potentiometer  Value and see changes in LED color.