I need a little more mermaid tail help.

I need a little more mermaid tail help. I have hooked up some WS2801 LEDs alongside my neopixels. When I call both types of chip at the same time I get a very strange intermittent flicker in the neopixels, while the WS2801 LEDs work just fine. If I comment out the line calling the WS2801 chips, my neopixels work fine (but of course not the WS2801 lights). Any reason why this might be?

Posting code in the comments.

41c67c46cbcba64d160b8af05fde78fd.gif

#include <FastSPI_LED2.h>
//#include <FastLED.h>

#define VERSION_NUMBER 0.51

//—LED SETUP STUFF
#define LED_COUNT 28 //FOR TESTING w/ SIGN
#define LED_DT 9 //SERIAL DATA PIN
#define LED_CK 8 //SERIAL CLOCK PIN
#define DATA_PIN 9
#define COLOR_ORDER GRB
int ihue = 0;
struct CRGB leds[LED_COUNT];

//------------------SETUP------------------
void setup()
{
LEDS.setBrightness(255);
FastLED.addLeds<NEOPIXEL, LED_DT, COLOR_ORDER>(leds, LED_COUNT);
FastLED.addLeds<WS2801, LED_DT, LED_CK, COLOR_ORDER>(leds, LED_COUNT); //this is the line I comment out to make the neopixels work

LEDS.show();
Serial.println(“--SETUP COMPLETE–”);
}

//-----------------MAIN LOOP-----------------
void loop() {
new_rainbow_loop();
}

void new_rainbow_loop(){ //-m88-RAINBOW FADE FROM FAST_SPI2
ihue -= 1;
fill_rainbow( leds, LED_COUNT, ihue );
LEDS.show();
delay(50);
}

You need to use separate pins for the ws2801 and neopixel LEDs right now you have them both on pin 9

Oh. OK. Can I push the same code to both pins? How do I do that without doubling the code?

You won’t need to change anything else - just move the data line for either the neopixels or the ws2801s to another pin (and update the code as well).

You are already sharing the LEDs array with both strips - which is what I would’ve recommended for sending the same thing to both :slight_smile: