It's been awhile, as you know life certainly gets in the way.
But I'm back and have with your help, and lots of reading, have learned a little more.
Which just adds more questions that I just can't seem to find simple answers to.
I am trying to add your intStrobecount to the code you made above, but it does not seem to work.
Actually i have gotten the effect i want. I made this code
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 144
// 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 3
#define CLOCK_PIN 13
CRGBArray<NUM_LEDS> leds;
// Define the array of leds
CRGBSet partA(leds(0,47)); // Define custom pixel range with a name.
CRGBSet partB(leds(48,95)); // Define custom pixel range with a name.
CRGBSet partC(leds(96,144)); // Define custom pixel range with a name.
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
// Turn the LED on, then pause
//=============================================PartA======================================================
partA = CRGB(0,0,0);
FastLED.show();
delay(50);
partA = CRGB(255,0,0);
FastLED.show();
delay(50);
partA = CRGB(0,0,0);
FastLED.show();
delay(50);
partA = CRGB(255,0,0);
FastLED.show();
delay(50);
partA = CRGB(0,0,0);
FastLED.show();
delay(50);
//=====================================PartB============================================
partB = CRGB(0,0,0);
FastLED.show();
delay(50);
partB = CRGB(0,255,0);
FastLED.show();
delay(50);
partB = CRGB(0,0,0);
FastLED.show();
delay(50);
partB = CRGB(0,255,0);
FastLED.show();
delay(50);
partB = CRGB(0,0,0);
FastLED.show();
delay(50);
//===================================PartC==============================================
partC = CRGB(0,0,0);
FastLED.show();
delay(50);
partC = CRGB(255,255,0);
FastLED.show();
delay(50);
partC = CRGB(0,0,0);
FastLED.show();
delay(50);
partC = CRGB(255,255,0);
FastLED.show();
delay(50);
partC = CRGB(0,0,0);
FastLED.show();
delay(50);
}
But i am trying to understand your style of programming, I've tried to add the StrobeCount myself,
I'm not getting errors but it's not working, I think i'm missing something fundamental
void loop() {
Strobe(150, 2);
}
void Strobe(int FlashDelay, int StrobeCount){
for(int k = 0; k < StrobeCount; k++) // trying to get 2 strobes from each segment
for(int j = 0; j < 3; j++) { // count 0 - 1 (3 segments)
for(int i = 0; i < 47; i++) { // set the 3 segments
switch(j) {
case 0: setPixel( (j*48)+i, 0xff, 0x00, 0x00 ); break; // 1st segment, RED
case 1: setPixel( (j*48)+i, 0x00, 0xff, 0x00 ); break; // 2nd segment, GREEN
case 2: setPixel( (j*48)+i, 0xff, 0xff, 0x00 ); break; // 2nd segment, YELLOW
}
}
showStrip(); // show colors
delay(FlashDelay); // wait a little
setAll(0,0,0); // set all to black (OFF)
showStrip();
delay(FlashDelay);
}
}
Do you know of a book that focuses of what I'm trying to learn? Or is this just common programming knowledge?