Show Posts
Pages: [1] 2 3 4
1  Community / Exhibition / Gallery / Re: Arduino IDE based immersive sound visualizer - SoundPuddle on: July 04, 2013, 08:29:45 am
Bada$$

 smiley-wink
2  Using Arduino / Project Guidance / Re: arduino, raspberry pi, tlc5940's on: February 01, 2013, 09:20:36 am
for the pi i'm assuming all i have to do is create a simple script such as:

Code:
import time
import serial
 
#configure the serial connection
 
ser = serial.Serial("/dev/ttyACM0",9600)
 
ser.open()
 
# add some time delays to stop the Arduino resetting
 
time.sleep(1.5)
 
ser.isOpen()
 
time.sleetp(1.5)
 
ser.write("10,50,12,0,0,0,45,78,54,56,0,45,21,22,74,65,41,23,22,0,0,0,12,51,85,95,45,52,65,7,07,32,50+")
3  Using Arduino / Project Guidance / Re: arduino, raspberry pi, tlc5940's on: February 01, 2013, 08:37:00 am
Also note for site admins!! I started this thread "Krolo" but idk why it showed up as "sermat"
4  Using Arduino / Project Guidance / Re: arduino, raspberry pi, tlc5940's on: February 01, 2013, 08:34:50 am
so I ran into a problem with string length because it would be longer the "long" can handle. I could split it up, but if I'm going to do that I might as well do it along the way with arrays and delimiters. 

Will this work? My goal here is to populate the array, then execute it. The position of the array also corresponds to the position of the led. If this works I'll make it into a multidimensional array to accommodate sequences.



Code:

int color[32];
int delay = 0;
int n = 0;
int m = 0;

String txtMsg = "";                         // a string for incoming text

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  // send an intro:
  Serial.println("\n\nString  length():");
  Serial.println();
}

void loop() {
  // add any incoming characters to the String:
  while (Serial.available() > 0) {
    char inChar = Serial.read();
    if(inChar==44){                  //  comma separated value for  array ;
    color[n] = txtMsg;
    n++;
    txtMsg = 0;       // i want to clear txtMsg but will this just append a zero at the front?;
   } else if (inChar==43){ // plus sign to signify last char which is the delay;
    delay = txtMsg;
 
   ** execute rest of code***
        n = 0;
       m = 0;
        txtMsg = 0;
} else {
    txtMsg += inChar;
   }
 
}
5  Using Arduino / Project Guidance / Re: Interface with Raspberry Pi on: January 30, 2013, 08:57:30 am

This is what I want to control with the raspberry pi webserver

http://www.youtube.com/embed/kwIKgy6EBoQ
6  Using Arduino / Project Guidance / Re: Interface with Raspberry Pi on: January 30, 2013, 08:53:46 am
Circuit taken from here http://arduino.cc/forum/index.php/topic,17106.0.html tlc's are powered by the 5v. V1 is also 5v. 12v going to V2 and the arduino.
7  Using Arduino / Project Guidance / Re: Interface with Raspberry Pi on: January 30, 2013, 08:26:09 am
The TLC5940's and arduino are powered off a computer power supply. Whenever I introduce the usb just as a serial monitor everything shuts down, if I unplug it ever thing comes back on. I'm assuming it is because of introducing an additional ground to the circuit.
8  Using Arduino / Project Guidance / Re: Interface with Raspberry Pi on: January 04, 2013, 09:32:54 am

I want to have a raspberry pi run a webserver with php to and communicate to the arduino via usb. I have the arduino powering some tlc5940 driver chips and they are powered by an ATX power supply.

I am not able to use the usb serial monitor to my laptop when it is powered by the atx power supply (seperate grounds i'm assuming). Will I have any issues if the usb is plugged into the PI, like it does with my laptop?
9  Using Arduino / LEDs and Multiplexing / Re: LED Blossom 32rgb 3w tlc5940 on: December 14, 2012, 03:57:59 am
Here is a more complete video.

10  Using Arduino / LEDs and Multiplexing / Re: LED Blossom 32rgb 3w tlc5940 on: December 13, 2012, 02:20:46 am
I got this working.

11  Using Arduino / LEDs and Multiplexing / Re: LED Blossom 32rgb 3w tlc5940 on: December 07, 2012, 11:00:06 am
hmm, both these functions yield no output


Code:
void fibi3(int endcount, int wait){

     
  byte sequence[32]=  {0, 9, 18, 27, 7, 15, 23, 31, 1, 9, 17, 25, 6, 14, 22, 30, 2, 10, 18, 26, 5, 13, 21, 29, 3, 11, 19, 4, 12, 20, 28};
 
 
  for (int howmanytimes = 0; howmanytimes < endcount; howmanytimes++){
  Tlc.clear();
   
  for (int i = 0; i < 32; i++){   
   
 Tlc.set(blue + sequence[i], bluepower[i]);
 Tlc.set(green + sequence[i], greenpower[i]);
 Tlc.set(red + sequence[i], redpower[i]);
 }
  Tlc.update();
 delay(wait);
  for ( int j = 0; j < 96; j++){
 choice[j] = choice[j] + 3;
 if (choice[j] > 95 ){
   choice[j] = 0;
   }
 
 }
 }
}
12  Using Arduino / LEDs and Multiplexing / Re: LED Blossom 32rgb 3w tlc5940 on: December 07, 2012, 06:28:01 am
So here is what you suggested:
void fibi3(int endcount, int wait){

     
  byte sequence[32]=  {0, 9, 18, 27, 7, 15, 23, 31, 1, 9, 17, 25, 6, 14, 22, 30, 2, 10, 18, 26, 5, 13, 21, 29, 3, 11, 19, 4, 12, 20, 28};
 
 
  for (int howmanytimes = 0; howmanytimes < endcount; howmanytimes++){
  Tlc.clear();
   
  for (int i = 0; i < 32; i++){   
   
 Tlc.set(blue + sequence, bluepower);
 Tlc.set(green + sequence, greenpower);
 Tlc.set(red + sequence, redpower);
 }
  Tlc.update();
 delay(wait);
  for ( int j = 0; j < 96; j++){
 choice[j] = choice[j] + 3;
 if (choice[j] > 95 ){
   choice[j] = 0;
   }
 
 }
 }
}

Seems simple enough, I'll upload a video of it when I get home.
13  Using Arduino / LEDs and Multiplexing / Re: LED Blossom 32rgb 3w tlc5940 on: December 07, 2012, 06:14:43 am
Ah actually that should give me a nice spiral as well.
I'm going to try this and I hope it gives me a spiral as well just a bit sharper:
void fibi2(int endcount, int wait){

     
  int sequence0[4]=  {0, 9, 18, 27};
   int sequence1[4]= {8, 17, 26, 4};
   int sequence2[4]= {16, 25, 5, 12};
  int sequence3[4]= {24, 6, 3, 20};
  int sequence4[4]= {7, 14, 21, 28};
   int sequence5[4]= {15, 22, 29, 3};
   int sequence6[4]= {23, 30, 2, 11};
   int sequence7[4]= {3, 1, 10, 19};
 
 
 
  for (int howmanytimes = 0; howmanytimes < endcount; howmanytimes++){
  Tlc.clear();
 
  for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence0[k], bluepower[0]);
 Tlc.set(green + sequence0[k], greenpower[0]);
 Tlc.set(red + sequence0[k], redpower[0]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence1[k], bluepower[1]);
 Tlc.set(green + sequence1[k], greenpower[1]);
 Tlc.set(red + sequence1[k], redpower[1]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence2[k], bluepower[2]);
 Tlc.set(green + sequence2[k], greenpower[2]);
 Tlc.set(red + sequence2[k], redpower[2]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence3[k], bluepower[3]);
 Tlc.set(green + sequence3[k], greenpower[3]);
 Tlc.set(red + sequence3[k], redpower[3]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence4[k], bluepower[4]);
 Tlc.set(green + sequence4[k], greenpower[4]);
 Tlc.set(red + sequence4[k], redpower[4]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence5[k], bluepower[5]);
 Tlc.set(green + sequence5[k], greenpower[5]);
 Tlc.set(red + sequence5[k], redpower[5]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence6[k], bluepower[6]);
 Tlc.set(green + sequence6[k], greenpower[6]);
 Tlc.set(red + sequence6[k], redpower[6]);
 }
 for (int k = 0; k < 4; k++){
 Tlc.set(blue + sequence7[k], bluepower[7]);
 Tlc.set(green + sequence7[k], greenpower[7]);
 Tlc.set(red + sequence7[k], redpower[7]);
 }
 
  Tlc.update();
 delay(wait);
  for ( int j = 0; j < 96; j++){
 choice[j] = choice[j] + 3;
 if (choice[j] > 95 ){
   choice[j] = 0;
 }
 }
 }
}
14  Using Arduino / LEDs and Multiplexing / LED Blossom 32rgb 3w tlc5940 on: December 07, 2012, 05:01:22 am
Here is a sample of my new LED blossom.



I have attached the layout of the LED's. I am wanting to remap it so it will spiral into (or out of) itself.
I rearranged it into a multidimensional array but the function does not do anything, maybe i'm missing something easy:

int blue = 0;
int green = 32;
int red = 64;


void fibi(int endcount, int wait){

      
  int sequence[8][4]={    {0, 9, 18, 27},
                          {8, 17, 26, 4},
                          {16, 25, 5, 12},
                          {24, 6, 3, 20},
                          {7, 14, 21, 28},
                          {15, 22, 29, 3},
                          {23, 30, 2, 11},
                          {3, 1, 10, 19}
  };
  
  
  for (int howmanytimes = 0; howmanytimes < endcount; howmanytimes++){
  Tlc.clear();
   for (int k = 0; k < 4; k++){
  for (int i = 0; i < 8; i++){


 for ( int j = 0; j < 96; j++){             //  this cycles the color wheel + 3 for each bluepower[?} etc..
 choice[j] = choice[j] + 3;
 if (choice[j] > 95 ){
   choice[j] = 0;
   }
 }
  
  
 Tlc.set(blue + sequence[k], bluepower[k]);
 Tlc.set(green + sequence[k], greenpower[k]);
 Tlc.set(red + sequence[k], redpower[k]);
 
 
 }
  Tlc.update();
 delay(wait);
 }
  }
}

15  Using Arduino / Project Guidance / controlling multiple led lamps on: September 19, 2012, 04:10:50 am
I want to make some LED lamps that are controlled by tlc5940 chips. The challenge is to synchronize them together from a master arduino located in a larger centerpiece and have 6 lamps surround it in a star topology anywhere from 8-20ft from the centerpiece.

1. Could I just run the tlc5940 signal lines to each lamp? or would the distance of >10ft degrade the signal too much?
2. put an arduino inside each lamp and connect all arduino's with the spi bus and have the master send out commands to six slaves.

I figured I would use cat5e for the spi lines or the tlc5940 signal lines but if there is a better alternative let me know.

I've got the tlc5940 code down pretty good but I have yet to network arduino's together or mess with any spi code.
Pages: [1] 2 3 4