loading
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 .

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
————————
Ribbon Wires
And
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!

Code-Push Button to Fade.ino

(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!

<p>good one, a project that works. Well done.</p>
cool project, I m a new comer in instructable , Should have used more leds in line to have a really cool effect , may be like blinking one by . well I m also from india :- )<br>working in a home automation project'on brain storming stage' , surely implant this idea.
you can get a cheap attiny and program it with your arduino. using the attiny, then you can free up the arduino.
<p>I Know about attiny but there are no attiny's available in my city. i found it in the south india and i am in north india so, i could not have any access to any of the attiny's :( in future i will see to buy through eBay. Thanks for Your Suggestion.</p>
<p>Nice work! Great mood lighting!</p>
Thanks :)

About This Instructable

3,342views

31favorites

License:

Bio: Just a Small Tinkerer ;)
More by Ayush Sharma:Pocket ESP8266 Weather Station [No ThingsSpeak] [Battery Powered] Make an Simple Motion Sensor Theft Alarm! (PIR)  (DIY) How to Make ESP8266 Ultra Mini & Simple Relay Home Automation Board 
Add instructable to: