Ok, first post here.
I want to show you my first arduino project. The aim was, to create something for my room. There was one blank wall over my bed i wanted to fill. i decided to build a LED-Panel.
Took longer than i thought ![]()
here are some Specs:
- 38 RGB LEDs
- 3xTLC 5940
- some wires
- 110x90cm acrylic glas
- random colors (fading very smooth from one to the other color)
at first, i dint like the light from the RGB leds. they are clear ones, so you could see the Dots of the different colors. I tried to solve that with some very fine sandpaper, but that wasnt good enough. i fixed the problem with a small piece of tape (the one used to cover switches when painting a room). That affects the brightness, i like the result.
some tasks are left undone:
-the view from the side isnt the nicest, i should apply something.....yeah....something is good ![]()
-the arduino is glued on the panel....so i need a new one. i was to lazy to build a free running board
-the prototype board left on the panel. my lazyness again ![]()
- some LEDs have are a bit darker than the others....i should change them...
And the code
#include "tlc_config.h"
#include "Tlc5940.h"
int red0;
int blue0;
int green0;
int color=1;
int blue=16;
int red=16;
int green=16;
int green_change;
int red_change;
int blue_change;
int time=0;
void setup()
{
 Tlc.init();
 Tlc.clear();
 pinMode(6, OUTPUT);
 pinMode(7, OUTPUT);
 pinMode(8, OUTPUT);
 green_change = random(16);
 blue_change = random(16);
 red_change =random(16);
};
void loop() {
Â
Â
 green0= green * 250 + time * (green_change-green) / 4 ;
 red0  = red  * 250 + time * (red_change  -red  ) / 4 ;
 blue0 = blue  * 250 + time * (blue_change -blue ) / 4 ;
 time=time+1;
 if (time>1000){
  time=0;
  green=green_change;
  red=red_change;
  blue=blue_change;
  green_change = random(16);
  blue_change = random(16);
  red_change =random(16);
 Â
  }
 Â
 color_set(1);
Â
}
void color_set(int repeat){
 for (int x=0;x<repeat;x++){
 if (color==1){
  Tlc.setAll(blue0);
  Tlc.update();
  while(tlc_needXLAT);
  color=2;
  digitalWrite(6,0);
  digitalWrite(8,1);
  }
Â
 if (color==2){
  Tlc.setAll(red0);
  Tlc.update();
  while(tlc_needXLAT);
  color=3;
  digitalWrite(8,0);
  digitalWrite(7,1);
  }
Â
 if (color==3){
  Tlc.setAll(green0);
  Tlc.update();
  while(tlc_needXLAT);
  color=1;
  digitalWrite(7,0);
  digitalWrite(6,1);
  }
}
}