loading
Make your fish tank colorful and bright with the power of Arduino and RGB LED's

Step 1: Gather Material

You will need:

-An RGB LED
-A fishtank with fish
-Arduino
-Resistors
-Jumper wires
-Computer with the Arduino IDE
-A USB a to b cable for syncing with the arduino
-9v battery
-tape
-scissiors
-cardboard

Step 2: Set Up Arduino

Use the picture to wire the Arduino, make sore to use resistors so you don't blow the RGB LED

Step 3: CODE

Connect the Arduino to a computer, open up the arduino IDE and paste the following code in:

int r=11;
int g=10;
int b=9;

int pv=0;

int yv=0;



void setup(){


pinMode(r, OUTPUT);

pinMode(g, OUTPUT);

pinMode(b, OUTPUT);



}



void loop(){

for(int rv=1; rv<204; rv++){

analogWrite(r,rv);

delay(10);

}

for(int rv=255; rv>1; rv--){

analogWrite(r,rv);

delay(10);

}

for(int gv=1; gv<204; gv++){

analogWrite(g,gv);

delay(10);

}
for(int gv=255; gv>1; gv--){

analogWrite(g,gv);

delay(10);

}
for(int bv=1; bv<204; bv++){

analogWrite(b,bv);

delay(10);

}

for(int bv=255; bv>1; bv--){

analogWrite(b,bv);

delay(10);

}
while(pv<204){

analogWrite(r,pv);

analogWrite(b,pv);

delay(10);

pv++;

}
while(pv>1){

analogWrite(r,pv);

analogWrite(b,pv);

delay(10);

pv--;

}
while(yv<204){

analogWrite(r,yv);

analogWrite(g,yv);

delay(10);

yv++;

}

while(yv>1){

analogWrite(r,yv);

analogWrite(g,yv);

delay(10);

yv--;

}




}

Step 4: Make Housing

Get a piece of cardboard and fold it into a box, then cut off the excess and tape. With the excess make walls for the two open sides of the box.

Step 5: Insert Ardiuno

Fold the arduino and breadboard so the fit into the box and cut an opening for the LED. Then poke the LED through the hole.

Step 6: Mount

Finish the box by sealing the remaining side and mount. Some ways I though to mount it are in the pictures above. If you have an idea leave it in the comments.

Step 7: Done!

You are now finished with your amazing RGB LED fish tank light
If you agree dont you think that light is dim. <br>Secondly, there was no need of Audrino which increased the overall cost of project. <br>And lastly the same effect could have been achieved with considerably low cost and high efficiency with variable color choice if RGB LED strip are used with remote control.
Great job! And thanks for the RGB LED arduino code!

About This Instructable

2,235views

6favorites

License:

More by Kale_3d:RFID access system Arduino Calculator CD case calendar 
Add instructable to: