Arduino Bed BackLights! [ Led Fade Control With a Push Button ]
by Ayush Sharma in Circuits > Arduino
4528 Views, 31 Favorites, 0 Comments
Arduino Bed BackLights! [ Led Fade Control With a Push Button ]
Hi EveryBody,
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 .
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 .
Video of LEDs in Action
Please See the Video To See what the code does.
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
————————
Ribbon Wires
And
Arduino Uno (Obviously)
[Mine is a Clone which I Bought from eBay]
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
————————
Ribbon Wires
And
Arduino Uno (Obviously)
[Mine is a Clone which I Bought from eBay]
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 ]
Now the Push Button
Solder the Wires to Push Button and Bend Legs to Fit on back of bed.
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.
We will be using this to connect to Arduino directly.
Add 10K Resistor
Add a 10K Resistor from Ground Wire to Pin 2.
Without this it Will not Work!
Without this it Will not Work!
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!
Code - Push Button to Fade.ino
(Right Click and Click "Save Link" ^^ to get the File)
Downloads
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.
The wire of button which was Soldered with a resistor will be Attached to Pin 2 and other Wire to +5v Pin.
Now Bed ( We Will Stick Behind It )
You can see that there is a plenty full space behing my bed.
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.
This will give effect when leds are lit.
Now Stick the Arduino With Double Tape
Apply the Double Tape to Arduino and Stick it to Wall or Bed.
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.
Run It!
Hurray!! We Have Made it!
Impress your Friends with this cool Effects in your room!