Fastspi_LED library

I am trying to use the library on the Arduino Uno with WS2801 LED strip. But it doesn’t seem to be doing what the demo code does. I have tried every method that I found by searching on google. I am wondering how is it that I can test just one LED at a time on the strip? Here is a sample code that i wrote to test just the first LED and it doesn’t seem to work since all the LED lights up.

#include <FastSPI_LED.h>

#define NUM_LEDS 32

// Sometimes chipsets wire in a backwards sort of way
struct CRGB { unsigned char b; unsigned char r; unsigned char g; };
// struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
struct CRGB *leds;

#define PIN 4

void setup()
{
  FastSPI_LED.setLeds(NUM_LEDS);
  //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.setDataRate(2);
  
  FastSPI_LED.init();
  FastSPI_LED.start();

  leds = (struct CRGB*)FastSPI_LED.getRGBData(); 
}

void loop()
{ 
  // one at a time
  //memset(leds, 0, NUM_LEDS * 3);
  
  leds[0].r = 255;
  leds[0].b = 0;
  leds[0].g = 0;
  FastSPI_LED.show();
  delay(1000);
  leds[0].r = 0;
  leds[0].b = 255;
  leds[0].g = 0;
  FastSPI_LED.show();
  delay(1000);
  leds[0].r = 0;
  leds[0].b = 0;
  leds[0].g = 255;
  FastSPI_LED.show();
  delay(1000);
}

I just tried it on my WS2801 string and it works as expected except you have the wrong CRGB struct selected. For the WS2801, use the RGB config, not the BRG (like you are now.) But, it should still light up regardless, the order of the colors will be green, red, and blue instead of red, blue, green like your sketch is written.

I got it to work. Is the power supply I am using. Now that I am using the arduino to power the strip it works.

If you are powering them separately, you need to connect the Arduino GND to the external power supply's GND. That's how I power my strips.

Why would you need to connect to the Arduino ground?

Because you have signals coming from the Arduino attempting to control something else that's not hooked up to the Arduino. That will never work. You have to connect the grounds together. Keep the VCCs separate, one for the Arduino board, and the other, presumably higher voltage and amp to the lights, and tie the grounds together.