so i got the other project working thanks to the help offered on here, now i have the problem of making the first (0) and third (2) leds on a led strip chase.
the code i have got is from somewhere online (i lost it and cant find it again from alot of googling around for a solution)
heres the code
#include <FastLED.h>
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 44
#define DATA_PIN 2
#define BRIGHTNESS 32
CRGB leds1[NUM_LEDS];
unsigned long delayPeriod = 50;
void setup() {
delay(2000);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds1, NUM_LEDS); // GRB ordering is typical
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
leds1[i] = CRGB::Blue;
FastLED.show();
leds1[i] = CRGB::Black;;
FastLED.show();
delay(delayPeriod);}
}
i tried
for (int i = 0, 2; i < NUM_LEDS; i++) {
for (int i = [0, 2]; i < NUM_LEDS; i++) {
for (int i = 0+2; i < NUM_LEDS; i++) {
none of which work.
im guessing the [0, 2] was along the right lines but i never defined an array and think thats where i went wrong?
some assistance would be great appreciated.
once i get first and third leds chasing i will probably add to it so every third led chases so it would end up as 0, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44 leds chasing with the leds in between off. lord i hope that makes sense.