Hi first time poster here. Thanks in advance for the help!
I am doing a fuse effect with a group of 7 leds traveling down a 5 meter strand running on Arduino Uno. Colors of leds range from
white (tip) to amber(tail)to imitate a sparking fuse. A tracking projected lit fuse video complete the effect. It looks great but as this is for a roller coaster
the effect have to match the speed of ride vehicle at 8ft/sec. A speed I am not able to achieve with my set up. Would using a Teensy 3.0 increase my chances of success?
How fast can I get the packect of Leds to travel with the Teensy and appropriate codes (faster then Uno?)? Maybe a faster chip then the ws2811?
Here's the Arduino code for reference.
I am doing a fuse effect with a group of 7 leds traveling down a 5 meter strand running on Arduino Uno. Colors of leds range from
white (tip) to amber(tail)to imitate a sparking fuse. A tracking projected lit fuse video complete the effect. It looks great but as this is for a roller coaster
the effect have to match the speed of ride vehicle at 8ft/sec. A speed I am not able to achieve with my set up. Would using a Teensy 3.0 increase my chances of success?
How fast can I get the packect of Leds to travel with the Teensy and appropriate codes (faster then Uno?)? Maybe a faster chip then the ws2811?
Here's the Arduino code for reference.
Code:
#include <FastSPI_LED.h>
#define NUM_LEDS 85
// Sometimes chipsets wire in a backwards sort of way
struct CRGB {
unsigned char g;
unsigned char r;
unsigned char b;
};
// struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
struct CRGB *leds;
typedef struct
{
double R;
double G;
double B;
}
RgbFColor;
#define PIN 7
#define bri 50
#define chase 5 //speed of chase = 50 millisec. x 165 leds = 8sec.
unsigned long startPhase = 0;
char jumpState = 0;
void setup()
{
FastSPI_LED.setLeds(NUM_LEDS);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_SM16716);
FastSPI_LED.setChipset(CFastSPI_LED::SPI_TM1809);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_LPD6803);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_HL1606);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_595);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);
FastSPI_LED.setPin(PIN);
FastSPI_LED.init();
FastSPI_LED.start();
leds = (struct CRGB*)FastSPI_LED.getRGBData();
}
void loop(){
for(int i = 0 ; i < NUM_LEDS - 7;i++ ) { //- (X) x=number of leds in chase
memset(leds, 0, NUM_LEDS * 3);
int l = i;
leds[l].r = 13; leds[l].g =2; leds[l].b = 0; l++;
leds[l].r = 20; leds[l].g =3; leds[l].b = 0; l++;
leds[l].r = 35; leds[l].g =5; leds[l].b = 0; l++;//gb combo, l++ = push next
leds[l].r = 75; leds[l].g =10; leds[l].b = 0; l++;//gb combo, l++ = push next
leds[l].r = 125; leds[l].g = 24; leds[l].b = 0; l++; // rgb combo, l++ = push next
leds[l].r = 175; leds[l].g = 50; leds[l].b = 0; l++;
leds[l].r = 255; leds[l].g = 120; leds[l].b = 17; l++;
leds[l].r = random(250,50); leds[l].g = 120; leds[l].b = 17; l++;
// l+2; 2 space before next led, but NUM_LEDS - 5
FastSPI_LED.show(); //push current data
delay(chase); //speed of chase
}
digitalWrite (PIN, LOW);
delay(250); // 3 min. delay (180000 mil sec. - 5leds x 25 mil sec = 59975
}