Haven't Done any LED stuff for quite sometime but i've come back to it again and its like i'm a total noob as i cant get even the most basic setup to work.
I'm using a 5V 12A power supply connected as shown in the photo to power both the arduino and the strip of WS2812B leds.
+ve out from power supply to strip and VIN. -ve out from supply to gnd on strip and gnd on arduino. Data is on PWM pin 4 connected to strip.
I've tested the board with a simple blink of the onboard led and that works ok so the board is accepting programming.
On powering up i get a sequence of 3 leds lit, the first one being the 8th on the strip when i should be getting the whole strip blinking red.
I've also tried powering both strip and board solely from USB with the same result.
I've also tried changing data pins with same result.
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 300
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 4
//#define CLOCK_PIN 13
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}
Can anyone please tell the returning noob where i'm going wrong? as far as i can tell this should be all good.

