Adressable LED strips

Hi,
i test adressable LED strips from Adafruit with Arduino Nano v3.0. I have bought Neopixel strip (with WS2812 driver) ant this works perfect. But when i try DotStar strip (with APA102C LEDs) my Arduino cant work with this. Here is my code using fastled library:

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 10

// Define data & clock pin
#define DATA_PIN 3
#define CLOCK_PIN 12

CRGB leds[NUM_LEDS];

// Define the array of leds
void setup() {
  // I have APA102 strips
  FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
  // Turn odd LEDs on
  leds[0] = CRGB::Red;
  leds[2] = CRGB::Red;
  leds[4] = CRGB::Red;
  leds[6] = CRGB::Red;
  leds[8] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LEDs off, then pause
  leds[0] = CRGB::Black;
  leds[2] = CRGB::Black;
  leds[4] = CRGB::Black;
  leds[6] = CRGB::Black;
  leds[8] = CRGB::Black;
  FastLED.show();
  delay(500);
}

when i try Adafruit's DotStar library and run included standtest, led strip show only green color and nothing more...

Can someone tell me, where is problem?

PS: sorry for my bad english

Thanks,
Tom

EDIT: code tag fixed

OK... results of some investigation: when i use short strip (cca 10LEDs) and arduino is powered from USB port, eveything is OK. When i power arduino from external 5V@3A power source (connected to 5V pin) + longer LED strip (50+), LEDs doesn not work... ?!?

When i power arduino from external 5V@3A power source (connected to 5V pin) + longer LED strip (50+), LEDs doesn not work... ?!?

So you are doing something wrong then.

Have you got the power supplie's ground connected to the Arduino ground.

Have you read the how to use the forum sticky about posting code - I know this one it's no.

Ok...
New Arduino - no problem. I think this one is crazy :frowning: