Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Original code provided by Daniel Garcia 20141117
- And portions provided by Daniel Cikic 20141118
- Thank you both for your help :-)
- */
- #include "FastLED.h"
- #define BRIGHTNESS 192
- #define NUM_LEDS_PER_STRIP 70
- #define NUM_LEDS_LAST_STRIP 35
- #define NUM_STRIPS 3
- #define NUM_LEDS NUM_LEDS_PER_STRIP * 2 + NUM_LEDS_LAST_STRIP
- #define COL_WIDTH 14
- #define NUM_ROWS 5
- CRGB leds[NUM_LEDS];
- int XY(uint8_t x, uint8_t y) {
- // determine what column we're in
- uint16_t base = 0;
- if(x >= 14) base += NUM_LEDS_PER_STRIP;
- if(x >= 28) base += NUM_LEDS_PER_STRIP;
- // reduce x to the position in the specific column
- x %= 14;
- // columns B & C are wired the same
- if(base > 0) {
- if(y & 0x01) {
- // odd rows, reverse the ordering
- uint8_t rx = (COL_WIDTH - 1) - x;
- base += ((y*COL_WIDTH) + rx);
- } else {
- base += ((y*COL_WIDTH) + x);
- }
- } else {
- // column A is upside down, making this trickier
- uint8_t ry = (NUM_ROWS-1) - y;
- if(ry & 0x01) {
- base += ((ry*COL_WIDTH)+x);
- } else {
- uint8_t rx = (COL_WIDTH-1) -x ;
- base += ((ry*COL_WIDTH)+rx);
- }
- }
- return base;
- }
- // Added to allow selection of different blocks of lights 20141118
- byte Col1A[5][14] = {
- { 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56 }, // LEDs 0 to 69 Backwards because of first row
- { 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 },
- { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
- { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
- { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
- };
- byte Col2A[5][14] = {
- { 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 }, // LEDs 70 to 139
- { 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 },
- { 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111 },
- { 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125 },
- { 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139 }
- };
- byte Col3A[5][7] = {
- { 140, 141, 142, 143, 144, 145, 146 }, // LEDs 140 to 174
- { 147, 148, 149, 150, 151, 152, 153 },
- { 154, 155, 156, 157, 158, 159, 160 },
- { 161, 162, 163, 164, 165, 166, 167 },
- { 168, 169, 170, 171, 172, 173, 174 }
- };
- //Added to allow lighting up each column
- byte Col1[1][70] = {
- // LEDs 0 to 69 Backwards because of first row
- { 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
- };
- byte Col2[1][70] = {
- // LEDs 70 to 139
- { 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139 }
- };
- byte Col3[1][35] = {
- // LEDs 140 to 174
- { 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174 }
- };
- // Added to allow lighting up each row 20141203
- byte Rows[5][35] = {
- { 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 140, 141, 142, 143, 144, 145, 146 },
- { 147, 148, 149, 150, 151, 152, 153, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 },
- { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 154, 155, 156, 157, 158, 159, 160 },
- { 161, 162, 163, 164, 165, 166, 167, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
- { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 168, 169, 170, 171, 172, 173, 174 }
- };
- // Added to allow for Stars and Stripes
- byte Col1stripes[2][7] = {
- { 69, 67, 65, 63, 61, 59, 57 },
- { 42, 44, 46, 48, 50, 52, 54 }
- };
- byte Col1stars[2][7] = {
- { 68, 66, 64, 62, 60, 58, 56 },
- { 43, 45, 47, 49, 51, 53 }
- };
- void setup() {
- delay(5000); // Powerup Safely all LED devices :-)
- FastLED.clear(); // clear all leds
- FastLED.addLeds<NEOPIXEL, 10>(leds, NUM_LEDS_PER_STRIP).setDither(0);
- FastLED.addLeds<NEOPIXEL, 11>(leds + NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setDither(0);
- FastLED.addLeds<NEOPIXEL, 12>(leds + (2*NUM_LEDS_PER_STRIP), NUM_LEDS_LAST_STRIP).setDither(0);
- FastLED.setBrightness( BRIGHTNESS );
- // leds[NUM_LEDS] = CRGB::Black;
- // FastLED.delay(100);
- }
- void loop() {
- // AmerFlag1();
- // FastLED.delay(500);
- // Test to check for multiple lights on at a time
- // blocksredtogreen2();
- // FastLED.delay(100);
- Rows2();
- FastLED.delay(50);
- Columns();
- FastLED.delay(100);
- blocksredtogreen();
- FastLED.delay(100);
- blocksfiretoforest();
- FastLED.delay(100);
- blockscoraltosea();
- FastLED.delay(100);
- // testsms();
- // FastLED.delay(5000);
- Rows1();
- FastLED.delay(100);
- // redgreenshadow();
- // FastLED.delay(100);
- // redtogreen();
- // FastLED.delay(100);
- redtogreen2();
- FastLED.delay(100);
- }
- void testsms() {
- for(int y = 0; y < NUM_ROWS; y++) {
- for(int x = 0; x < COL_WIDTH*NUM_STRIPS; x++ ) {
- leds[x] = CRGB( 255, 0, 0);
- leds[y] = CRGB( 0, 255, 0);
- FastLED.show();
- FastLED.delay(500);
- leds[x] /= 2;
- leds[y] *= 2;
- //Set to black
- // leds[x] = CRGB::Black;
- // leds[y] = CRGB::Black;
- // Fade to Black
- leds[x].fadeToBlackBy( 64 );
- leds[y].fadeToBlackBy( 64 );
- FastLED.show();
- FastLED.delay(500);
- }
- }
- }
- void redtogreen() {
- for(int y = 0; y < NUM_ROWS; y++) {
- for(int x = 0; x < COL_WIDTH*NUM_STRIPS; x++ ) {
- leds[XY(x,y)] = CRGB::Red;
- leds[XY(x,y)] = CRGB::Green;
- FastLED.show();
- FastLED.delay(500);
- leds[XY(x,y)] = CRGB::Black;
- FastLED.show();
- }
- }
- }
- void redtogreen2() {
- for(int y = 0; y < NUM_ROWS; y++) {
- for(int x = 0; x < COL_WIDTH*NUM_STRIPS; x++ ) {
- leds[XY(x,y)] = CRGB::Red;
- FastLED.show();
- FastLED.delay(100);
- leds[XY(x,y)] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- leds[XY(x,y)] = CRGB::Black;
- }
- }
- }
- void redgreenshadow() {
- for(int y = 0; y < NUM_ROWS; y++) {
- for(int x = 0; x < COL_WIDTH*NUM_STRIPS; x++ ) {
- leds[XY(x,y)] = CRGB::Red;
- leds[XY(y,x)] = CRGB::Green;
- FastLED.show();
- FastLED.delay(500);
- leds[XY(x,y)] = CRGB::Black;
- }
- }
- }
- void blocksredtogreen() {
- Col1AGrp(0);
- Col2AGrp(0);
- Col3AGrp(0);
- Col3AGrp(1);
- Col2AGrp(1);
- Col1AGrp(1);
- Col1AGrp(2);
- Col2AGrp(2);
- Col3AGrp(2);
- Col3AGrp(3);
- Col2AGrp(3);
- Col1AGrp(3);
- Col1AGrp(4);
- Col2AGrp(4);
- Col3AGrp(4);
- FastLED.delay(100);
- }
- void blocksredtogreen2() {
- Col1AGrp1(0);
- Col2AGrp1(0);
- Col3AGrp1(0);
- Col3AGrp1(1);
- Col2AGrp1(1);
- Col1AGrp1(1);
- Col1AGrp1(2);
- Col2AGrp1(2);
- Col3AGrp1(2);
- Col3AGrp1(3);
- Col2AGrp1(3);
- Col1AGrp1(3);
- Col1AGrp1(4);
- Col2AGrp1(4);
- Col3AGrp1(4);
- FastLED.delay(100);
- }
- void blocksfiretoforest() {
- Col1BGrp(0);
- Col2BGrp(0);
- Col3BGrp(0);
- Col3BGrp(1);
- Col2BGrp(1);
- Col1BGrp(1);
- Col1BGrp(2);
- Col2BGrp(2);
- Col3BGrp(2);
- Col3BGrp(3);
- Col2BGrp(3);
- Col1BGrp(3);
- Col1BGrp(4);
- Col2BGrp(4);
- Col3BGrp(4);
- FastLED.delay(100);
- }
- void blockscoraltosea() {
- Col1CGrp(0);
- Col2CGrp(0);
- Col3CGrp(0);
- Col3CGrp(1);
- Col2CGrp(1);
- Col1CGrp(1);
- Col1CGrp(2);
- Col2CGrp(2);
- Col3CGrp(2);
- Col3CGrp(3);
- Col2CGrp(3);
- Col1CGrp(3);
- Col1CGrp(4);
- Col2CGrp(4);
- Col3CGrp(4);
- FastLED.delay(100);
- }
- void AmerFlag1() {
- // Col1Flag(0, CRGB::Blue);
- // Col1Flag(1, CRGB::Blue);
- Col1stripesA(0, CRGB::Blue);
- Col1stripesA(1, CRGB::Blue);
- Col1starsA(0, CRGB::White);
- Col1starsA(1, CRGB::White);
- Col1Flag(2, CRGB::Red);
- Col1Flag(3, CRGB::White);
- Col1Flag(4, CRGB::Red);
- Col2Flag(0, CRGB::Red);
- Col2Flag(1, CRGB::White);
- Col2Flag(2, CRGB::Red);
- Col2Flag(3, CRGB::White);
- Col2Flag(4, CRGB::Red);
- Col3Flag(0, CRGB::Red);
- Col3Flag(1, CRGB::White);
- Col3Flag(2, CRGB::Red);
- Col3Flag(3, CRGB::White);
- Col3Flag(4, CRGB::Red);
- FastLED.delay(500);
- Col3Flag(0, CRGB::Black);
- Col3Flag(1, CRGB::Black);
- Col3Flag(2, CRGB::Black);
- Col3Flag(3, CRGB::Black);
- Col3Flag(4, CRGB::Black);
- Col2Flag(0, CRGB::Black);
- Col2Flag(1, CRGB::Black);
- Col2Flag(2, CRGB::Black);
- Col2Flag(3, CRGB::Black);
- Col2Flag(4, CRGB::Black);
- Col1Flag(2, CRGB::Black);
- Col1Flag(3, CRGB::Black);
- Col1Flag(4, CRGB::Black);
- Col1stripesA(0, CRGB::Black);
- Col1stripesA(1, CRGB::Black);
- Col1starsA(0, CRGB::Black);
- Col1starsA(1, CRGB::Black);
- }
- void Rows1() {
- rows(0, CRGB::Red);
- rows(1, CRGB::Green);
- rows(2, CRGB::Red);
- rows(3, CRGB::Green);
- rows(4, CRGB::Red);
- FastLED.delay(50);
- rows(4, CRGB::Green);
- rows(3, CRGB::Red);
- rows(2, CRGB::Green);
- rows(1, CRGB::Red);
- rows(0, CRGB::Green);
- FastLED.delay(100);
- }
- void Rows2() {
- rows2(0);
- rows2(1);
- rows2(2);
- rows2(3);
- rows2(4);
- FastLED.delay(50);
- // rows(4, CRGB::Green);
- // rows(3, CRGB::Red);
- // rows(2, CRGB::Green);
- // rows(1, CRGB::Red);
- // rows(0, CRGB::Green);
- // FastLED.delay(100);
- }
- void Columns() {
- column1(0, CRGB::Red);
- column2(0, CRGB::Green);
- column3(0, CRGB::Red);
- FastLED.delay(50);
- column3(0, CRGB::Green);
- column2(0, CRGB::Red);
- column1(0, CRGB::Green);
- FastLED.delay(100);
- }
- // Group A
- void Col1AGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(150);
- leds[Col1A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- leds[Col1A[groupID][i]] = CRGB::Black;
- }
- }
- void Col2AGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col2A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(150);
- leds[Col2A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(100);
- leds[Col2A[groupID][i]] = CRGB::Black;
- }
- }
- void Col3AGrp(byte groupID) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col3A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(150);
- leds[Col3A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- // Group A2 Trying to light multiple leds at once
- void Col1AGrp1(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(150);
- leds[Col1A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- leds[Col1A[groupID][i]] = CRGB::Black;
- }
- }
- void Col2AGrp1(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col2A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(150);
- leds[Col2A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(100);
- leds[Col2A[groupID][i]] = CRGB::Black;
- }
- }
- void Col3AGrp1(byte groupID) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col3A[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(150);
- leds[Col3A[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- // Group B
- void Col1BGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1A[groupID][i]] = CRGB::ForestGreen;
- FastLED.show();
- // FastLED.delay(200);
- // leds[Col1A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col1A[groupID][i]] = CRGB::Black;
- }
- }
- void Col2BGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col2A[groupID][i]] = CRGB::FireBrick;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col2A[groupID][i]] = CRGB::Red;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col2A[groupID][i]] = CRGB::Black;
- }
- }
- void Col3BGrp(byte groupID) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col3A[groupID][i]] = CRGB::ForestGreen;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- // Group C
- void Col1CGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1A[groupID][i]] = CRGB::LightCoral;
- FastLED.show();
- // FastLED.delay(200);
- // leds[Col1A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col1A[groupID][i]] = CRGB::Black;
- }
- }
- void Col2CGrp(byte groupID) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col2A[groupID][i]] = CRGB::LightSeaGreen;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col2A[groupID][i]] = CRGB::Red;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col2A[groupID][i]] = CRGB::Black;
- }
- }
- void Col3CGrp(byte groupID) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col3A[groupID][i]] = CRGB::LightCoral;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- FastLED.delay(150);
- leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- // Rows and Columns 20141208
- void rows(byte groupID, uint32_t color) {
- for (int i = 0; i < 35; i++) {
- leds[Rows[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- }
- for (int i = 35 - 1; i >= 0; i--) {
- leds[Rows[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- leds[Rows[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- }
- // Test to try and get multiple lights on at once
- // void rows2(byte groupID, uint32_t color) {
- void rows2(byte groupID) {
- for (int i = 0; i < 35; i++) {
- leds[Rows[groupID][i]] = CRGB::Red;
- FastLED.show();
- FastLED.delay(150);
- leds[Rows[groupID][i]] = CRGB::Green;
- FastLED.show();
- FastLED.delay(100);
- // leds[Rows[groupID][i]].fadeToBlackBy( 64 );
- leds[Rows[groupID][i]] = CRGB::Black;
- // FastLED.show();
- // FastLED.delay(150);
- }
- /*
- for (int i = 35 - 1; i >= 0; i--) {
- leds[Rows[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- leds[Rows[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- */
- }
- void column1(byte groupID, uint32_t color) {
- for (int i = 0; i < 70; i++) {
- leds[Col1[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- }
- for (int i = 70 - 1; i >= 0; i--) {
- leds[Col1[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- leds[Col1[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- }
- void column2(byte groupID, uint32_t color) {
- for (int i = 0; i < 70; i++) {
- leds[Col2[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- }
- for (int i = 70 - 1; i >= 0; i--) {
- leds[Col2[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- leds[Col2[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- }
- void column3(byte groupID, uint32_t color) {
- for (int i = 0; i < 35; i++) {
- leds[Col3[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- }
- for (int i = 35 - 1; i >= 0; i--) {
- leds[Col3[groupID][i]] = color;
- FastLED.show();
- FastLED.delay(50);
- leds[Col1[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- }
- void fadetoblk(byte groupID) {
- for (int i = 0; i < 35; i++) {
- leds[Rows[groupID][i]].fadeToBlackBy(15);
- FastLED.show();
- }
- }
- // American Flag
- void Col1stripesA(byte groupID, uint32_t color) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1stripes[groupID][i]] = color;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- // FastLED.delay(50);
- // leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- void Col1starsA(byte groupID, uint32_t color) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1stars[groupID][i]] = color;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- // FastLED.delay(50);
- // leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- void Col1Flag(byte groupID, uint32_t color) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col1A[groupID][i]] = color;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- // FastLED.delay(50);
- // leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- void Col2Flag(byte groupID, uint32_t color) {
- for (int i = 0; i < 14; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col2A[groupID][i]] = color;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- // FastLED.delay(50);
- // leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
- void Col3Flag(byte groupID, uint32_t color) {
- for (int i = 0; i < 7; i++) {
- // leds[Col1A[groupID][i].setHSV(color, 255, 150);
- leds[Col3A[groupID][i]] = color;
- FastLED.show();
- // FastLED.delay(100);
- // leds[Col3A[groupID][i]] = CRGB::Green;
- // FastLED.show();
- // FastLED.delay(50);
- // leds[Col3A[groupID][i]] = CRGB::Black;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment