Introduction: Arduino Bed BackLights! [ Led Fade Control With a Push Button ]
Today we will make Arduino Bed BackLights! In Which led Fade is controlled by a Push Button!.
When we Press the Push Button the Lights Starts Fading in and out and when we release the Push button then Lights Stop at that brightness. When we again press the button then lights will again fade in and out from that position.
I think a video will explain it more Smoothly so Please see it .
Step 1: Video of LEDs in Action
Please See the Video To See what the code does.
Step 2: Get the Parts .....
Get the Following :-
1x Push Button
4x UV Lights ( Or any color of your choice but remember to add a resistor if using red or yellow LEDs)
1x 10k Resistor
Arduino Uno (Obviously)
[Mine is a Clone which I Bought from eBay]
Step 3: Solder the LEDs in Parallel
Solder the Leds in Parallel and leave a gap between each led [Leave a Gap according to your bed's back ]
Step 4: Now the Push Button
Solder the Wires to Push Button and Bend Legs to Fit on back of bed.
Step 5: Solder Solid Core Jumper to Wires
Cut Small and solder them at ends of Wires.
We will be using this to connect to Arduino directly.
Step 6: Add 10K Resistor
Add a 10K Resistor from Ground Wire to Pin 2.
Without this it Will not Work!
Step 7: The Code!
I made this Code with the Intermixing of Button and Fade Example!
As the Result i could see the fade effect only when i pushed my Button!
(Right Click and Click "Save Link" ^^ to get the File)
Step 8: Connections to Arduino
Connect The Power Line of LEDs to Pin 11 and Ground to Ground.
The wire of button which was Soldered with a resistor will be Attached to Pin 2 and other Wire to +5v Pin.
Step 9: Now Bed ( We Will Stick Behind It )
You can see that there is a plenty full space behing my bed.
Step 10: Stick the LEDs on Wall to Give a Effect.
Paste their Heads with the wall with no gaps.
This will give effect when leds are lit.
Step 11: Now Stick the Arduino With Double Tape
Apply the Double Tape to Arduino and Stick it to Wall or Bed.
Step 12: Connect the Arduino With a 5v Power Source
The usb Wire I Got was Very Short So I Had to Buy a New Which is very much long to reach the 5v charger in outlet.
Step 13: Run It!
Hurray!! We Have Made it!
Impress your Friends with this cool Effects in your room!