#include // Because conditional #includes don't work w/Arduino sketches... #include // COMMENT OUT THIS LINE FOR GEMMA OR TRINKET //#include // ENABLE THIS LINE FOR GEMMA OR TRINKET #define NUMPIXELS 64 // Number of LEDs in strip #define NEONUMPIXELS 8 // Number of LEDs in strip // Here's how to control the LEDs from any two pins: // External // DATAPIN 4 - CLOCKPIN 5 // Internal // DATAPIN 7 - CLOCKPIN 8 #define DATAPIN 29 #define CLOCKPIN 30 #define PIN 0 Adafruit_DotStar strip = Adafruit_DotStar((NUMPIXELS * 2 ) + 1, DOTSTAR_BGR); uint32_t buffer[(NUMPIXELS * 2) + 1]; byte source[NUMPIXELS + 1]; unsigned long startMillis; uint32_t makeColour(byte r, byte g, byte b) { uint32_t w = (65536 * strip.gamma8(r)) + ( 256 * strip.gamma8(g)) + strip.gamma8(b); return w; } /* squares bars spiral risingStars curve slideCubes randomCubes checkerBoard sparkles */ // patterns const byte squares[] = {0,0,1,1,2,2,3,3,0,0,1,1,2,2,3,3,1,1,2,2,3,3,4,4,1,1,2,2,3,3,4,4,2,2,3,3,4,4,5,5,2,2,3,3,4,4,5,5,3,3,4,4,5,5,6,6,3,3,4,4,5,5,6,6}; const byte bars[] = {0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7}; const byte spiral[] = {0,1,2,3,4,5,6,7,27,28,29,30,31,33,8,26,47,48,49,50,51,34,9,25,46,59,60,61,52,35,10,24,45,58,63,62,53,36,11,23,44,57,56,55,54,37,12,22,43,42,41,40,39,38,13,21,20,19,18,17,16,15,14}; const byte corners[] = { 1,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,1 }; const byte risingStars[]={ 120,0,72,24,168,96,144,48, 121,1,73,25,169,97,145,49, 122,2,74,26,170,98,146,50, 123,3,75,27,171,99,147,51, 124,4,76,28,172,100,148,52, 125,5,77,29,173,101,149,53, 126,6,78,30,174,102,150,54, 127,7,79,31,175,103,151,55 }; const byte curve[]={ 254,128,64,32,32,16,8,8, 8,8,16,32,32,64,128,254, 254,128,64,32,32,16,8,8, 8,8,16,32,32,64,128,254, 254,128,64,32,32,16,8,8, 8,8,16,32,32,64,128,254, 254,128,64,32,32,16,8,8, 8,8,16,32,32,64,128,254, }; const byte slideCubes[]={ 7,7,23,23,39,39,55,55, 6,6,22,22,38,38,54,54, 5,5,21,21,37,37,53,53, 4,4,20,20,36,36,52,52, 3,3,19,19,35,35,51,51, 2,2,18,18,34,34,50,50, 1,1,17,17,33,33,49,49, 0,0,16,16,32,32,48,48 }; const byte randomCubes[] = { 12,12,15,15,7,7,3,3, 12,12,15,15,7,7,3,3, 6,6,13,13,5,5,14,14, 6,6,13,13,5,5,14,14, 0,0,1,1,11,11,9,9, 0,0,1,1,11,11,9,9, 2,2,8,8,10,10,4,4, 2,2,8,8,10,10,4,4 }; const byte checkerBoard[] = { 0,0,128,128,0,0,128,128, 0,0,128,128,0,0,128,128, 128,128,0,0,128,128,0,0, 128,128,0,0,128,128,0,0, 0,0,128,128,0,0,128,128, 0,0,128,128,0,0,128,128, 128,128,0,0,128,128,0,0, 128,128,0,0,128,128,0,0 }; const byte sparkles[] = { 4,8,5,9,2,13,6,15, 5,7,6,8,3,12,7,14, 6,6,7,7,4,11,8,13, 7,5,8,6,5,10,9,12, 8,4,9,5,6,9,10,11, 9,3,10,4,7,8,11,10, 10,2,11,3,8,7,12,9, 11,1,12,2,9,6,13,8 }; const byte bigSquares[] = { 8,8,8,8,1,1,1,1, 8,8,8,8,1,1,1,1, 8,8,8,8,1,1,1,1, 8,8,8,8,1,1,1,1, 9,9,9,9,0,0,0,0, 9,9,9,9,0,0,0,0, 9,9,9,9,0,0,0,0, 9,9,9,9,0,0,0,0 }; const byte fatSpiral[] = { 5,5,4,4,3,3,2,2, 5,5,4,4,3,3,2,2, 6,6,14,14,15,15,1,1, 6,6,14,14,15,15,1,1, 7,7,13,13,12,12,0,0, 7,7,13,13,12,12,0,0, 8,8,9,9,10,10,11,11, 8,8,9,9,10,10,11,11 }; byte currentLayout = 0; // colours uint32_t clu_temp[256] = {}; uint32_t clu_main[256] = {}; uint32_t clu_BLANK[255] = { }; uint32_t clu_rainbow[255] = {}; uint32_t clu_255Random[255] = {}; uint32_t clu_wheel[255] = {}; uint32_t clu_wheel_slow[255] = {}; uint32_t clu_blue_red[256] = {}; uint32_t clu_teal_purple[256] = {}; uint32_t clu_red_orange[256] = { }; uint32_t clu_teal_blue[256] = { }; uint32_t clu_red_black[256] = { }; uint32_t clu_purple_yellow[256] = { }; uint32_t clu_yellow_green[256] = { }; uint32_t clu_orange_green[256] = { }; uint32_t clu_yellow_dkblue[256] = { }; uint32_t clu_magenta_green[256] = { }; uint32_t clu_while_sparkles[256] = {}; String wheelBase[] = { "p", "y", "g", "p", "g", "b", "p", "y", "b", "r", "y", "b", "y", "r", "y", "b", "p", "y", "b", "r", "g", "b", "r", "g", "y", "p", "g", "p", "y", "g", "b", "y", "g", "r", "b", "y", "r", "p", "r", "p", "b", "y", "r", "p", "b", "y", "g", "b" "y", "p", "b", "g", "y", "g", "y", "p", "p", "y", "g", "y", "r", "p", "r", "g" }; const uint32_t clu_test[] = { 0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff,0x00ffff, 0x00ff00, 0xffffff }; const uint32_t clu_testFULL[] = { 0xff0000,0xff0000, 0x00ff00,0x00ff00, 0x0000ff,0x0000ff, 0xffff00,0xffff00, 0xff00ff,0xff00ff,0x00ffff,0x00ffff, 0x00ff00,0x00ff00, 0xffffff,0xffffff, }; const uint32_t clu_red_yellow[] = { 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 , 0xff0000, 0xff1100, 0xff2200, 0xff3300, 0xff4400, 0xff5500, 0xff6600, 0xff7700, 0xff8800, 0xff9900, 0xffaa00, 0xffbb00, 0xffcc00, 0xffdd00, 0xffee00, 0xffff00 }; const uint32_t clu_blue_red_builder[] = { 0x0000ff, 0x2200ff, 0x4400ff, 0x6600ff, 0x8800ff, 0xaa00ff, 0xcc00ff, 0xee00ff, 0xff00ee, 0xff00cc, 0xff00aa, 0xff0088, 0xff0066, 0xff0044, 0xff0022, 0xff0000}; const uint32_t clu_blue_red_builder_bounce[] = { 0x0000ff, 0x2200ff, 0x4400ff, 0x6600ff, 0x8800ff, 0xaa00ff, 0xcc00ff, 0xee00ff, 0xff00ee, 0xff00cc, 0xff00aa, 0xff0088, 0xff0066, 0xff0044, 0xff0022, 0xff0000, 0xff0000, 0xff0022, 0xff0044, 0xff0066, 0xff0088, 0xff00aa, 0xff00cc, 0xff00ee, 0xee00ff, 0xcc00ff, 0xaa00ff, 0x8800ff, 0x6600ff, 0x4400ff, 0x2200ff, 0x0000ff}; const uint32_t clu_teal_purple_builder[] = {0x00ffff, 0x00ddff, 0x00bbff, 0x0099ff, 0x0077ff, 0x0055ff, 0x0033ff, 0x0011ff, 0x1100ff, 0x3300ff, 0x5500ff, 0x7700ff, 0x9900ff, 0xbb00ff, 0xdd00ff, 0xff00ff}; const uint32_t clu_teal_purple_builder_bounce[] = {0x00ffff, 0x00ddff, 0x00bbff, 0x0099ff, 0x0077ff, 0x0055ff, 0x0033ff, 0x0011ff, 0x1100ff, 0x3300ff, 0x5500ff, 0x7700ff, 0x9900ff, 0xbb00ff, 0xdd00ff, 0xff00ff, 0xff00ff, 0xdd00ff, 0xbb00ff, 0x9900ff, 0x7700ff, 0x5500ff, 0x3300ff, 0x1100ff, 0x0011ff, 0x0033ff, 0x0055ff, 0x0077ff, 0x0099ff, 0x00bbff, 0x00ddff, 0x00ffff,}; const uint32_t clu_red_orange_builder[] = { 0xff0000, 0xff0c00, 0xff1700, 0xff2300, 0xff2f00, 0xff3a00, 0xff4600, 0xff5200, 0xff5d00, 0xff6900, 0xff7500, 0xff8000, 0xff8c00, 0xff9800, 0xffa300, 0xffaf00 }; const uint32_t clu_red_orange_builder_bounce[] = { 0xff0000, 0xff0c00, 0xff1700, 0xff2300, 0xff2f00, 0xff3a00, 0xff4600, 0xff5200, 0xff5d00, 0xff6900, 0xff7500, 0xff8000, 0xff8c00, 0xff9800, 0xffa300, 0xffaf00, 0xffaf00, 0xffa300, 0xff9800, 0xff8c00, 0xff8000, 0xff7500, 0xff6900, 0xff5d00, 0xff5200, 0xff4600, 0xff3a00, 0xff2f00, 0xff2300, 0xff1700, 0xff0c00, 0xff0000 }; const uint32_t clu_teal_blue_builder[] = { 0x00ffff, 0x00eeff, 0x00ddff, 0x00ccff, 0x00bbff, 0x00aaff, 0x0099ff, 0x0088ff, 0x0077ff, 0x0066ff, 0x0055ff, 0x0044ff, 0x0033ff, 0x0022ff, 0x0011ff, 0x0000ff }; const uint32_t clu_teal_blue_builder_bounce[] = { 0x00ffff, 0x00eeff, 0x00ddff, 0x00ccff, 0x00bbff, 0x00aaff, 0x0099ff, 0x0088ff, 0x0077ff, 0x0066ff, 0x0055ff, 0x0044ff, 0x0033ff, 0x0022ff, 0x0011ff, 0x0000ff, 0x0000ff, 0x0011ff, 0x0022ff, 0x0033ff, 0x0044ff, 0x0055ff, 0x0066ff, 0x0077ff, 0x0088ff, 0x0099ff, 0x00aaff, 0x00bbff, 0x00ccff, 0x00ddff, 0x00eeff, 0x00ffff }; const uint32_t clu_red_black_builder[] = { 0xff0000, 0xee0000, 0xdd0000, 0xcc0000, 0xbb0000, 0xaa0000, 0x990000, 0x880000, 0x770000, 0x660000, 0x550000, 0x440000, 0x330000, 0x220000, 0x080000, 0x000000 }; const uint32_t clu_red_black_builder_bounce[] = { 0xff0000, 0xee0000, 0xdd0000, 0xcc0000, 0xbb0000, 0xaa0000, 0x990000, 0x880000, 0x770000, 0x660000, 0x550000, 0x440000, 0x330000, 0x220000, 0x080000, 0x000000, 0x000000, 0x080000, 0x220000, 0x330000, 0x440000, 0x550000, 0x660000, 0x770000, 0x880000, 0x990000, 0xaa0000, 0xbb0000, 0xcc0000, 0xdd0000, 0xee0000, 0xff0000 }; const uint32_t clu_purple_yellow_builder[] = { 0xff00ff, 0xff00dd, 0xff00bb, 0xff0099, 0xff0077, 0xff0055, 0xff0033, 0xff0011, 0xff1100, 0xff3300, 0xff5500, 0xff7700, 0xff9900, 0xffbb00, 0xffdd00, 0xffff00}; const uint32_t clu_purple_yellow_builder_bounce[] = { 0xff00ff, 0xff00dd, 0xff00bb, 0xff0099, 0xff0077, 0xff0055, 0xff0033, 0xff0011, 0xff1100, 0xff3300, 0xff5500, 0xff7700, 0xff9900, 0xffbb00, 0xffdd00, 0xffff00, 0xffff00, 0xffdd00, 0xffbb00, 0xff9900, 0xff7700, 0xff5500, 0xff3300, 0xff1100, 0xff0011, 0xff0033, 0xff0055, 0xff0077, 0xff0099, 0xff00bb, 0xff00dd, 0xff00ff}; const uint32_t clu_yellow_green_builder[] = { 0xffff00, 0xeeff00, 0xddff00, 0xccff00, 0xbbff00, 0xaaff00, 0x99ff00, 0x88ff00, 0x77ff00, 0x66ff00, 0x55ff00, 0x44ff00, 0x33ff00, 0x22ff00, 0x11ff00, 0x00ff00 }; const uint32_t clu_yellow_green_builder_bounce[] = { 0xffff00, 0xeeff00, 0xddff00, 0xccff00, 0xbbff00, 0xaaff00, 0x99ff00, 0x88ff00, 0x77ff00, 0x66ff00, 0x55ff00, 0x44ff00, 0x33ff00, 0x22ff00, 0x11ff00, 0x00ff00, 0x00ff00, 0x11ff00, 0x22ff00, 0x33ff00, 0x44ff00, 0x55ff00, 0x66ff00, 0x77ff00, 0x88ff00, 0x99ff00, 0xaaff00, 0xbbff00, 0xccff00, 0xddff00, 0xeeff00, 0xffff00, }; const uint32_t clu_orange_green_builder[] = { 0xff5300, 0xff6f00, 0xff8c00, 0xffa800, 0xffc500, 0xffe100, 0xfffe00, 0xe4ff00, 0xc7ff00, 0xabff00, 0x8eff00, 0x72ff00, 0x55ff00, 0x39ff00, 0x1cff00, 0x00ff00 }; const uint32_t clu_orange_green_builder_bounce[] = { 0xff5300, 0xff6f00, 0xff8c00, 0xffa800, 0xffc500, 0xffe100, 0xfffe00, 0xe4ff00, 0xc7ff00, 0xabff00, 0x8eff00, 0x72ff00, 0x55ff00, 0x39ff00, 0x1cff00, 0x00ff00, 0x00ff00, 0x1cff00, 0x39ff00, 0x55ff00, 0x72ff00, 0x8eff00, 0xabff00, 0xc7ff00, 0xe4ff00, 0xfffe00, 0xffe100, 0xffc500, 0xffa800, 0xff8c00, 0xff6f00, 0xff5300 }; const uint32_t clu_yellow_dkblue_builder[] = { makeColour(250, 250, 110), makeColour(217, 242, 113), makeColour(185, 233, 118), makeColour(156, 223, 124), makeColour(127, 212, 130), makeColour(100, 201, 135), makeColour(74, 189, 140), makeColour(48, 176, 142), makeColour(20, 163, 143), makeColour(0, 150, 142), makeColour(0, 137, 138), makeColour(0, 123, 132), makeColour(16, 110, 124), makeColour(29, 97, 114), makeColour(38, 84, 102), makeColour(42, 72, 88) }; const uint32_t clu_yellow_dkblue_builder_bounce[] = { makeColour(250, 250, 110), makeColour(217, 242, 113), makeColour(185, 233, 118), makeColour(156, 223, 124), makeColour(127, 212, 130), makeColour(100, 201, 135), makeColour(74, 189, 140), makeColour(48, 176, 142), makeColour(20, 163, 143), makeColour(0, 150, 142), makeColour(0, 137, 138), makeColour(0, 123, 132), makeColour(16, 110, 124), makeColour(29, 97, 114), makeColour(38, 84, 102), makeColour(42, 72, 88), makeColour(42, 72, 88), makeColour(38, 84, 102), makeColour(29, 97, 114), makeColour(16, 110, 124), makeColour(0, 123, 132), makeColour(0, 137, 138), makeColour(0, 150, 142), makeColour(20, 163, 143), makeColour(48, 176, 142), makeColour(74, 189, 140), makeColour(100, 201, 135), makeColour(127, 212, 130), makeColour(156, 223, 124), makeColour(185, 233, 118), makeColour(217, 242, 113), makeColour(250, 250, 110) }; const uint32_t clu_magenta_green_builder[] = { makeColour(250, 110, 229), makeColour(255, 102, 207), makeColour(255, 99, 184), makeColour(255, 101, 159), makeColour(255, 109, 135), makeColour(255, 121, 110), makeColour(255, 137, 87), makeColour(255, 153, 64), makeColour(255, 170, 42), makeColour(255, 185, 17), makeColour(237, 200, 0), makeColour(213, 214, 15), makeColour(185, 226, 44), makeColour(152, 237, 73), makeColour(109, 246, 104), makeColour(0, 255, 138) }; const uint32_t clu_magenta_green_builder_bounce[] = { makeColour(250, 110, 229), makeColour(255, 102, 207), makeColour(255, 99, 184), makeColour(255, 101, 159), makeColour(255, 109, 135), makeColour(255, 121, 110), makeColour(255, 137, 87), makeColour(255, 153, 64), makeColour(255, 170, 42), makeColour(255, 185, 17), makeColour(237, 200, 0), makeColour(213, 214, 15), makeColour(185, 226, 44), makeColour(152, 237, 73), makeColour(109, 246, 104), makeColour(0, 255, 138), makeColour(0, 255, 138), makeColour(109, 246, 104), makeColour(152, 237, 73), makeColour(185, 226, 44), makeColour(213, 214, 15), makeColour(237, 200, 0), makeColour(255, 185, 17), makeColour(255, 170, 42), makeColour(255, 153, 64), makeColour(255, 137, 87), makeColour(255, 121, 110), makeColour(255, 109, 135), makeColour(255, 101, 159), makeColour(255, 99, 184), makeColour(255, 102, 207), makeColour(250, 110, 229) }; const uint32_t clu_while_sparkles_builder[] = { 0,0,0,0,0,0,0,0, 0xffffff, 0x808080, 0x404040, 0x202020, 0x202020, 0x0f0f0f, 0x080808, 0x080808 }; const uint32_t clu_guardians[] = { 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff, 0xff00ff, 0xff22dd, 0xff44bb, 0xff6699, 0xff8877, 0xffaa55, 0xffcc33, 0xffee11, 0xeeff11, 0xccff33, 0xaaff55, 0x88ff77, 0x66ff99, 0x44ffbb, 0x22ffdd, 0x00ffff }; const uint32_t clu_guardians_smooth[] = { 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff, 0xff00ff, 0xff11ee, 0xff22dd, 0xff33cc, 0xff44bb, 0xff55aa, 0xff6699, 0xff7788, 0xff8877, 0xff9966, 0xffaa55, 0xffbb44, 0xffcc33, 0xffdd22, 0xffee11, 0xffff11, 0xeeff11, 0xddff22, 0xccff33, 0xbbff44, 0xaaff55, 0x99ff66, 0x88ff77, 0x77ff88, 0x66ff99, 0x55ffaa, 0x44ffbb, 0x33ffcc, 0x22ffdd, 0x11ffee, 0x00ffff, 0x00ffff }; const uint32_t clu_guardians_smooth_long[] = { 0xff00ff,0xff00ff, 0xff11ee,0xff11ee,0xff22dd,0xff22dd,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff6699,0xff6699,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0xff00ff,0xff00ff, 0xff11ee,0xff11ee,0xff22dd,0xff22dd,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff6699,0xff6699,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff,0xff00ff,0xff00ff, 0xff11ee,0xff11ee,0xff22dd,0xff22dd,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff6699,0xff6699,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0xff00ff,0xff00ff, 0xff11ee,0xff11ee,0xff22dd,0xff22dd,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff6699,0xff6699,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff }; const uint32_t clu_guardians_smooth_xlong[] = { 0xff00ff,0xff00ff,0xff00ff,0xff00ff,0xff11ee,0xff11ee,0xff11ee,0xff11ee, 0xff22dd,0xff22dd,0xff22dd,0xff22dd,0xff33cc,0xff33cc,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff55aa,0xff55aa, 0xff6699,0xff6699,0xff6699,0xff6699,0xff7788,0xff7788,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc,0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0xff00ff,0xff00ff,0xff00ff,0xff00ff,0xff11ee,0xff11ee,0xff11ee,0xff11ee, 0xff22dd,0xff22dd,0xff22dd,0xff22dd,0xff33cc,0xff33cc,0xff33cc,0xff33cc, 0xff44bb,0xff44bb,0xff44bb,0xff44bb,0xff55aa,0xff55aa,0xff55aa,0xff55aa, 0xff6699,0xff6699,0xff6699,0xff6699,0xff7788,0xff7788,0xff7788,0xff7788, 0xff8877, 0xff8877, 0xff8877, 0xff8877, 0xff9966, 0xff9966, 0xff9966, 0xff9966, 0xffaa55, 0xffaa55, 0xffaa55, 0xffaa55, 0xffbb44, 0xffbb44, 0xffbb44, 0xffbb44, 0xffcc33, 0xffcc33, 0xffcc33, 0xffcc33, 0xffdd22, 0xffdd22, 0xffdd22, 0xffdd22, 0xffee11, 0xffee11, 0xffee11, 0xffee11, 0xffff11, 0xffff11, 0xffff11, 0xffff11, 0xeeff11, 0xeeff11, 0xeeff11, 0xeeff11, 0xddff22, 0xddff22, 0xddff22, 0xddff22, 0xccff33, 0xccff33, 0xccff33, 0xccff33, 0xbbff44, 0xbbff44, 0xbbff44, 0xbbff44, 0xaaff55, 0xaaff55, 0xaaff55, 0xaaff55, 0x99ff66, 0x99ff66, 0x99ff66, 0x99ff66, 0x88ff77, 0x88ff77, 0x88ff77, 0x88ff77, 0x77ff88, 0x77ff88, 0x77ff88, 0x77ff88, 0x66ff99, 0x66ff99, 0x66ff99, 0x66ff99, 0x55ffaa, 0x55ffaa, 0x55ffaa, 0x55ffaa, 0x44ffbb, 0x44ffbb, 0x44ffbb, 0x44ffbb, 0x33ffcc,0x33ffcc,0x33ffcc,0x33ffcc, 0x22ffdd, 0x22ffdd, 0x22ffdd, 0x22ffdd, 0x11ffee, 0x11ffee, 0x11ffee, 0x11ffee, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, 0x00ffff, }; const uint32_t clu_white_comet[] = { 0,0,0,0,0,0,0,0, 0xffffff, 0x808080, 0x404040, 0x202020, 0x202020, 0x0f0f0f, 0x080808, 0x080808, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0xffffff, 0x808080, 0x404040, 0x202020, 0x202020, 0x0f0f0f, 0x080808, 0x080808, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0 }; const uint32_t clu_doubles[] = { 0xADBEF2,0xADBEF2,0x59D358,0x59D358,0x1744AE,0x1744AE,0x5DFDFE,0x5DFDFE, 0xCC1441,0xCC1441,0xE3E90A,0xE3E90A,0x6A22E5,0x6A22E5,0x6A22E5,0x6A22E5,0x325714,0x325714,0x7D1A81,0x7D1A81,0xA5B10E,0xA5B10E, 0x9157B8,0x9157B8,0x3D2D06,0x3D2D06,0x04A9A4,0x04A9A4,0x890DBF,0x890DBF,0x8328C4,0x8328C4,0xA5BBDC,0xA5BBDC,0xD39715,0xD39715, 0x09BAA8,0x09BAA8,0x2C5765,0x2C5765,0x5B6172,0x5B6172,0x9B20F5,0x9B20F5,0x4682F8,0x4682F8,0x250A79,0x250A79,0x5B559B,0x5B559B, 0xD1DE9F,0xD1DE9F,0x4ABAE4,0x4ABAE4,0x48BFE4,0x48BFE4,0xD7B2E1,0xD7B2E1,0xB3BFF0,0xB3BFF0,0x3B57D6,0x3B57D6,0xB0CC14,0xB0CC14, 0xADBEF2,0xADBEF2,0x59D358,0x59D358,0x1744AE,0x1744AE,0x5DFDFE,0x5DFDFE, 0xCC1441,0xCC1441,0xE3E90A,0xE3E90A,0x6A22E5,0x6A22E5,0x6A22E5,0x6A22E5,0x325714,0x325714,0x7D1A81,0x7D1A81,0xA5B10E,0xA5B10E, 0x9157B8,0x9157B8,0x3D2D06,0x3D2D06,0x04A9A4,0x04A9A4,0x890DBF,0x890DBF,0x8328C4,0x8328C4,0xA5BBDC,0xA5BBDC,0xD39715,0xD39715, 0x09BAA8,0x09BAA8,0x2C5765,0x2C5765,0x5B6172,0x5B6172,0x9B20F5,0x9B20F5,0x4682F8,0x4682F8,0x250A79,0x250A79,0x5B559B,0x5B559B, 0xD1DE9F,0xD1DE9F,0x4ABAE4,0x4ABAE4,0x48BFE4,0x48BFE4,0xD7B2E1,0xD7B2E1,0xB3BFF0,0xB3BFF0,0x3B57D6,0x3B57D6,0xB0CC14,0xB0CC14, 0xADBEF2,0xADBEF2,0x59D358,0x59D358,0x1744AE,0x1744AE,0x5DFDFE,0x5DFDFE, 0xCC1441,0xCC1441,0xE3E90A,0xE3E90A,0x6A22E5,0x6A22E5,0x6A22E5,0x6A22E5,0x325714,0x325714,0x7D1A81,0x7D1A81,0xA5B10E,0xA5B10E, 0x9157B8,0x9157B8,0x3D2D06,0x3D2D06,0x04A9A4,0x04A9A4,0x890DBF,0x890DBF,0x8328C4,0x8328C4,0xA5BBDC,0xA5BBDC,0xD39715,0xD39715, 0x09BAA8,0x09BAA8,0x2C5765,0x2C5765,0x5B6172,0x5B6172,0x9B20F5,0x9B20F5,0x4682F8,0x4682F8,0x250A79,0x250A79,0x5B559B,0x5B559B, 0xD1DE9F,0xD1DE9F,0x4ABAE4,0x4ABAE4,0x48BFE4,0x48BFE4,0xD7B2E1,0xD7B2E1,0xB3BFF0,0xB3BFF0,0x3B57D6,0x3B57D6,0xB0CC14,0xB0CC14, 0xADBEF2,0xADBEF2,0x59D358,0x59D358,0x1744AE,0x1744AE,0x5DFDFE,0x5DFDFE, 0xCC1441,0xCC1441,0xE3E90A,0xE3E90A,0x6A22E5,0x6A22E5,0x6A22E5,0x6A22E5,0x325714,0x325714,0x7D1A81,0x7D1A81,0xA5B10E,0xA5B10E, 0x9157B8,0x9157B8,0x3D2D06,0x3D2D06,0x04A9A4,0x04A9A4,0x890DBF,0x890DBF,0x8328C4,0x8328C4,0xA5BBDC,0xA5BBDC,0xD39715,0xD39715, 0x09BAA8,0x09BAA8,0x2C5765,0x2C5765,0x5B6172,0x5B6172,0x9B20F5,0x9B20F5,0x4682F8,0x4682F8,0x250A79,0x250A79,0x5B559B,0x5B559B, 0xD1DE9F,0xD1DE9F,0x4ABAE4,0x4ABAE4,0x48BFE4,0x48BFE4,0xD7B2E1,0xD7B2E1,0xB3BFF0,0xB3BFF0,0x3B57D6,0x3B57D6,0xB0CC14,0xB0CC14 }; const uint32_t clu_blacknwhite[] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0, 0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0,0xFFFFF0 }; void buildCLUs() { byte pos = 0; // for(int i = 0; i<=15;i++){ for(int x = 0; x<=15; x++) { pos = x * 16; Serial.println(pos); // clu_blue_red[i + (pos)] = clu_blue_red_builder[i]; memmove( clu_blue_red + pos, clu_blue_red_builder, sizeof(clu_blue_red_builder) ); memmove( clu_teal_purple + pos, clu_teal_purple_builder, sizeof(clu_teal_purple_builder) ); memmove( clu_red_orange + pos, clu_red_orange_builder, sizeof(clu_red_orange_builder) ); memmove( clu_teal_blue + pos, clu_teal_blue_builder, sizeof(clu_teal_blue_builder) ); memmove( clu_red_black + pos, clu_red_black_builder, sizeof(clu_red_black_builder) ); memmove( clu_purple_yellow + pos, clu_purple_yellow_builder, sizeof(clu_purple_yellow_builder) ); memmove( clu_yellow_green + pos, clu_yellow_green_builder, sizeof(clu_yellow_green_builder) ); memmove( clu_orange_green + pos, clu_orange_green_builder, sizeof(clu_orange_green_builder) ); memmove( clu_yellow_dkblue + pos, clu_yellow_dkblue_builder, sizeof(clu_yellow_dkblue_builder) ); memmove( clu_magenta_green + pos, clu_magenta_green_builder, sizeof(clu_magenta_green_builder) ); memmove( clu_while_sparkles + pos, clu_while_sparkles_builder, sizeof(clu_while_sparkles_builder) ); } //} } // clu_blue_red_builder_bounce void buildBounceCLUs() { byte pos = 0; // for(int i = 0; i<=15;i++){ for(int x = 0; x<=8; x++) { pos = x * 32; Serial.println(pos); // clu_blue_red[i + (pos)] = clu_blue_red_builder[i]; memmove( clu_blue_red + pos, clu_blue_red_builder_bounce, sizeof(clu_blue_red_builder_bounce) ); memmove( clu_teal_purple + pos, clu_teal_purple_builder_bounce, sizeof(clu_teal_purple_builder_bounce) ); memmove( clu_red_orange + pos, clu_red_orange_builder_bounce, sizeof(clu_red_orange_builder_bounce) ); memmove( clu_teal_blue + pos, clu_teal_blue_builder_bounce, sizeof(clu_teal_blue_builder_bounce) ); memmove( clu_red_black + pos, clu_red_black_builder_bounce, sizeof(clu_red_black_builder_bounce) ); memmove( clu_purple_yellow + pos, clu_purple_yellow_builder_bounce, sizeof(clu_purple_yellow_builder_bounce) ); memmove( clu_yellow_green + pos, clu_yellow_green_builder_bounce, sizeof(clu_yellow_green_builder_bounce) ); memmove( clu_orange_green + pos, clu_orange_green_builder_bounce, sizeof(clu_orange_green_builder_bounce) ); memmove( clu_yellow_dkblue + pos, clu_yellow_dkblue_builder_bounce, sizeof(clu_yellow_dkblue_builder_bounce) ); memmove( clu_magenta_green + pos, clu_magenta_green_builder_bounce, sizeof(clu_magenta_green_builder_bounce) ); } //} } void buildRainbow() { Serial.println(""); Serial.println("buildRainbow"); int firstPixelHue = 0; for(int i=0; i<255; i++) { // For each pixel in strip... // Offset pixel hue by an amount to make one full revolution of the // color wheel (range of 65536) along the length of the strip // (strip.numPixels() steps): int pixelHue = firstPixelHue + (i * 65536L / 255); // strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or // optionally add saturation and value (brightness) (each 0 to 255). // Here we're using just the single-argument hue variant. The result // is passed through strip.gamma32() to provide 'truer' colors // before assigning to each pixel: Serial.print(strip.gamma32(strip.ColorHSV(pixelHue))); Serial.print(' '); clu_rainbow[i] = strip.gamma32(strip.ColorHSV(pixelHue)); } }; void buildRandom() { // gamma8 byte r; byte g; byte b; for(int i=0; i<255; i++) { // For each pixel in strip... r = strip.gamma8(random(255)); g = strip.gamma8(random(255)); b = strip.gamma8(random(255)); clu_255Random[i] = makeColour(r, g, b); } } void buildWheel() { String c; byte x; byte y; uint32_t wanted; memmove( clu_wheel, clu_BLANK, sizeof(clu_BLANK) ); memmove( clu_wheel_slow, clu_BLANK, sizeof(clu_BLANK) ); // clu_wheel // clu_wheel_slow x = 0; y = 0; for(int i=0; i<= 63; i++) { c = wheelBase[i]; Serial.println(c); wanted = 0x808080; if (c == "r") { wanted=0xff0000; } if (c == "g") { wanted=0x00ff00; } if (c == "b") { wanted=0x0000FF; } if (c == "y") { wanted=0xffff00; } if (c == "p") { wanted=0xff00ff; } clu_wheel[x]=wanted; clu_wheel[128 + x]=wanted; x++; clu_wheel[x]=wanted; clu_wheel[128 + x]=wanted; x++; clu_wheel_slow[y]=wanted; y++; clu_wheel_slow[y]=wanted; y++; clu_wheel_slow[y]=wanted; y++; clu_wheel_slow[y]=wanted; y++; } } void createInitial() { for ( int i = 0; i <= 254; i++) { clu_BLANK[i] =0; // clu_BLANK[i] = makeColour(i, 0, 255-i); } memmove( clu_main, clu_BLANK, sizeof(clu_BLANK) ); buildRainbow(); buildRandom(); buildWheel(); buildCLUs(); buildBounceCLUs(); } void copySource() { memmove( source, fatSpiral, sizeof(fatSpiral) ); } void copyColours() { // RESET CLU memmove( clu_main, clu_BLANK, sizeof(clu_BLANK) ); memmove( clu_main, clu_magenta_green, sizeof(clu_magenta_green) ); } void cycleColours() { //for ( int i = 1; i <= 253; i++) { // clu_BLANK[i] =0; // clu_temp[i -1] = clu_main[i]; // } memmove(&clu_temp, &clu_main[1], sizeof(clu_main)-4); clu_temp[254] = clu_main[0]; //Serial.println(""); // Serial.println("###"); //for ( int i = 0; i <= 254; i++) { // clu_BLANK[i] =0; // Serial.print(clu_main[i], HEX); // Serial.print(' '); // } memmove(clu_main, clu_temp, sizeof(clu_main)); } void setup() { #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000L) clock_prescale_set(clock_div_1); // Enable 16 MHz on Trinket #endif strip.begin(); // Initialize pins for output strip.clear(); strip.show(); // Turn all LEDs off ASAP strip.setBrightness(55); createInitial(); copySource(); copyColours(); startMillis = millis(); } void displayBuffer() { // copySource(); //currentLayout = 9; layoutPicker(currentLayout); strip.clear(); byte spot; for ( int i = 0; i <= (NUMPIXELS); i++) { spot = source[i]; strip.setPixelColor(i, clu_main[spot]); // Serial.println(String(buffer[i], HEX)); // buffer[i] = 0; } strip.show(); } void layoutPicker(byte patternSelect) { /* squares bars spiral risingStars curve slideCubes randomCubes checkerBoard sparkles */ switch (patternSelect) { case 0: memmove( source, squares, sizeof(squares) ); break; case 1: memmove( source, bars, sizeof(bars) ); break; case 2: // memmove( source, spiral, sizeof(spiral) ); memmove( source, bigSquares, sizeof(bigSquares) ); break; case 3: memmove( source, risingStars, sizeof(risingStars) ); break; case 4: memmove( source, curve, sizeof(curve) ); break; case 5: memmove( source, slideCubes, sizeof(slideCubes) ); break; case 6: memmove( source, randomCubes, sizeof(randomCubes) ); break; case 7: memmove( source, checkerBoard, sizeof(checkerBoard) ); break; case 8: memmove( source, sparkles, sizeof(sparkles) ); break; case 9: memmove( source, fatSpiral, sizeof(fatSpiral) ); break; default: // if nothing else matches, do the default // default is optional memmove( source, corners, sizeof(corners) ); break; } } void swapPallete() { byte colourSelect = random(23); switch (colourSelect) { case 0: memmove( clu_main, clu_rainbow, sizeof(clu_rainbow) ); break; case 1: memmove( clu_main, clu_255Random, sizeof(clu_255Random) ); break; case 2: memmove( clu_main, clu_wheel, sizeof(clu_wheel) ); break; case 3: memmove( clu_main, clu_wheel_slow, sizeof(clu_wheel_slow) ); break; case 4: memmove( clu_main, clu_blue_red, sizeof(clu_blue_red) ); break; case 5: memmove( clu_main, clu_teal_purple, sizeof(clu_teal_purple) ); break; case 6: memmove( clu_main, clu_red_orange, sizeof(clu_red_orange) ); break; case 7: memmove( clu_main, clu_teal_blue, sizeof(clu_teal_blue) ); break; case 8: memmove( clu_main, clu_red_black, sizeof(clu_red_black) ); break; case 9: memmove( clu_main, clu_purple_yellow, sizeof(clu_purple_yellow) ); break; case 10: memmove( clu_main, clu_yellow_green, sizeof(clu_yellow_green) ); break; case 11: memmove( clu_main, clu_orange_green, sizeof(clu_orange_green) ); break; case 12: memmove( clu_main, clu_yellow_dkblue, sizeof(clu_yellow_dkblue) ); break; case 13: memmove( clu_main, clu_magenta_green, sizeof(clu_magenta_green) ); break; case 14: memmove( clu_main, clu_while_sparkles, sizeof(clu_while_sparkles) ); break; case 15: memmove( clu_main, clu_red_yellow, sizeof(clu_red_yellow) ); break; case 16: memmove( clu_main, clu_guardians, sizeof(clu_guardians) ); break; case 17: memmove( clu_main, clu_guardians_smooth, sizeof(clu_guardians_smooth) ); break; case 18: memmove( clu_main, clu_guardians_smooth_long, sizeof(clu_guardians_smooth_long) ); break; case 19: memmove( clu_main, clu_guardians_smooth_xlong, sizeof(clu_guardians_smooth_xlong) ); break; case 20: memmove( clu_main, clu_white_comet, sizeof(clu_white_comet) ); break; case 21: memmove( clu_main, clu_doubles, sizeof(clu_doubles) ); break; case 22: memmove( clu_main, clu_blacknwhite, sizeof(clu_blacknwhite) ); break; default: // if nothing else matches, do the default // default is optional memmove( clu_main, clu_wheel, sizeof(clu_wheel) ); break; } /* clu_guardians_smooth clu_guardians_smooth_long clu_guardians_smooth_xlong clu_white_comet clu_doubles clu_blacknwhite */ } void loop() { // 300000 = 5 minutes unsigned long currentMillis = millis(); if (currentMillis - startMillis > 150000) { Serial.println("Swap"); currentLayout = random(10); swapPallete(); Serial.println(currentLayout); startMillis = currentMillis; } displayBuffer(); cycleColours(); // delay(40); // Pause 20 milliseconds (~50 FPS) delay(120); }