Skip to content

Instantly share code, notes, and snippets.

@SoCalTIM SoCalTIM/Anjunalogo.txt
Last active Mar 14, 2018

Embed
What would you like to do?
An LED Top Hat using neopixels to display a variety of sprites.
#include <FastLED.h>
#include <LEDMatrix.h>
#include <LEDSprites.h>
// Change the next 6 defines to match your matrix type and size
#define LED_PIN 6
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
#define MATRIX_WIDTH 38
#define MATRIX_HEIGHT 19
#define MATRIX_TYPE VERTICAL_ZIGZAG_MATRIX
#define FRAMES_PER_SECOND 120
#define NUM_LEDS MATRIX_WIDTH * MATRIX_HEIGHT
CRGB strip[NUM_LEDS];
cLEDMatrix<-MATRIX_WIDTH, -MATRIX_HEIGHT, MATRIX_TYPE> leds;
#define RIBBON_WIDTH 9
#define RIBBON_HEIGHT 13
#define ANJUNA_WIDTH 13
#define ANJUNA_HEIGHT 9
#define CG_WIDTH 14
#define CG_HEIGHT 13
#define TENT_WIDTH 15
#define TENT_HEIGHT 15
#define SOUL_WIDTH 38
#define SOUL_HEIGHT 15
#define HUNDRED_WIDTH 21
#define HUNDRED_HEIGHT 17
#define ONEFIFTY_WIDTH 38
#define ONEFIFTY_HEIGHT 19
#define OHFIVEOH_WIDTH 20
#define OHFIVEOH_HEIGHT 18
#define ANB_WIDTH 31
#define ANB_HEIGHT 18
#define ANBSMALL_WIDTH 11
#define ANBSMALL_HEIGHT 16
#define TWOHUNDRED_WIDTH 16
#define TWOHUNDRED_HEIGHT 19
#define THREEHUNDRED_WIDTH 16
#define THREEHUNDRED_HEIGHT 19
#define WE_WIDTH 39
#define WE_HEIGHT 16
#define TAKESOUL_WIDTH 47
#define TAKESOUL_HEIGHT 19
int ColorIndex;
const bool kMatrixSerpentineLayout = true;
const uint8_t RibbonData[] =
{
B8_4BIT(01002003),B8_4BIT(00000000),//1
B8_4BIT(00102030),B8_4BIT(00000000),//2
B8_4BIT(80102030),B8_4BIT(40000000),//3
B8_4BIT(08012304),B8_4BIT(00000000),//4
B8_4BIT(70812340),B8_4BIT(50000000),//5
B8_4BIT(07782455),B8_4BIT(00000000),//6
B8_4BIT(66655566),B8_4BIT(60000000),//7
B8_4BIT(05542877),B8_4BIT(00000000),//8
B8_4BIT(50432180),B8_4BIT(70000000),//9
B8_4BIT(04032108),B8_4BIT(00000000),//10
B8_4BIT(40302010),B8_4BIT(80000000),//11
B8_4BIT(00302010),B8_4BIT(00000000),//12
B8_4BIT(03002001),B8_4BIT(00000000),//13
};
const uint8_t RibbonMask[] =
{
B8_1BIT(01001001),B8_1BIT(00000000),//1
B8_1BIT(00101010),B8_1BIT(00000000),//2
B8_1BIT(10101010),B8_1BIT(10000000),//3
B8_1BIT(01011101),B8_1BIT(00000000),//4
B8_1BIT(10111110),B8_1BIT(10000000),//5
B8_1BIT(01111111),B8_1BIT(00000000),//6
B8_1BIT(11111111),B8_1BIT(10000000),//7
B8_1BIT(01111111),B8_1BIT(00000000),//8
B8_1BIT(10111110),B8_1BIT(10000000),//9
B8_1BIT(01011101),B8_1BIT(00000000),//10
B8_1BIT(10101010),B8_1BIT(10000000),//11
B8_1BIT(00101010),B8_1BIT(00000000),//12
B8_1BIT(01001001),B8_1BIT(00000000),//13
};
const uint8_t AnjunaData[] =
{
B8_2BIT(00011100),B8_2BIT(00000000),
B8_2BIT(00110010),B8_2BIT(00000000),
B8_2BIT(01101001),B8_2BIT(00000000),
B8_2BIT(11000100),B8_2BIT(10000000),
B8_2BIT(11111010),B8_2BIT(01000000),
B8_2BIT(01110001),B8_2BIT(00100000),
B8_2BIT(00100000),B8_2BIT(10010000),
B8_2BIT(00000000),B8_2BIT(01001000),
B8_2BIT(00000000),B8_2BIT(00111000),
};
const uint8_t AnjunaMask[] =
{
B8_1BIT(00011100),B8_1BIT(00000000),
B8_1BIT(00110010),B8_1BIT(00000000),
B8_1BIT(01101001),B8_1BIT(00000000),
B8_1BIT(11000100),B8_1BIT(10000000),
B8_1BIT(11111010),B8_1BIT(01000000),
B8_1BIT(01110001),B8_1BIT(00100000),
B8_1BIT(00100000),B8_1BIT(10010000),
B8_1BIT(00000000),B8_1BIT(01001000),
B8_1BIT(00000000),B8_1BIT(00111000),
};
const uint8_t CGData[]
{
B8_5BIT(00000098),B8_5BIT(10000000),//0
B8_5BIT(00000111),B8_5BIT(81000000),//1
B8_5BIT(00001911),B8_5BIT(19100000),//2
B8_5BIT(00001811),B8_5BIT(11800000),//3
B8_5BIT(00009111),B8_5BIT(19100000),//4
B8_5BIT(00000111),B8_5BIT(81000000),//5
B8_5BIT(000A2411),B8_5BIT(15B30000),//6
B8_5BIT(00222241),B8_5BIT(53333000),//7
B8_5BIT(02222A27),B8_5BIT(3333B300),//8
B8_5BIT(0A22A226),B8_5BIT(33B33300),//9
B8_5BIT(02222226),B8_5BIT(B3333B00),//10
B8_5BIT(002A2220),B8_5BIT(33333000),//11
B8_5BIT(00022A00),B8_5BIT(03BB0000),//12
};
const uint8_t CGMask[] =
{
B8_1BIT(00000011),B8_1BIT(10000000),//0
B8_1BIT(00000111),B8_1BIT(11000000),//1
B8_1BIT(00001111),B8_1BIT(11100000),//1
B8_1BIT(00001111),B8_1BIT(11100000),//1
B8_1BIT(00001111),B8_1BIT(11100000),//1
B8_1BIT(00000111),B8_1BIT(11000000),//1
B8_1BIT(00011111),B8_1BIT(11110000),//1
B8_1BIT(00111111),B8_1BIT(11111000),//1
B8_1BIT(01111111),B8_1BIT(11111100),//1
B8_1BIT(01111111),B8_1BIT(11111100),//9
B8_1BIT(01111111),B8_1BIT(11111100),//10
B8_1BIT(00111110),B8_1BIT(11111000),//11
B8_1BIT(00011100),B8_1BIT(01110000),//11
};
const uint8_t TentData[] =
{
B8_4BIT(00000010),B8_4BIT(20000000),//1
B8_4BIT(00000001),B8_4BIT(00000000),//2
B8_4BIT(00000020),B8_4BIT(10000000),//3
B8_4BIT(00000200),B8_4BIT(01000000),//4
B8_4BIT(00002000),B8_4BIT(00100000),//5
B8_4BIT(00020005),B8_4BIT(00010000),//6
B8_4BIT(00200040),B8_4BIT(50001000),//7
B8_4BIT(02000400),B8_4BIT(05000100),//8
B8_4BIT(33334000),B8_4BIT(00566610),//9
B8_4BIT(00000000),B8_4BIT(00000000),//10
B8_4BIT(00777077),B8_4BIT(70777000),//11
B8_4BIT(00007070),B8_4BIT(00707000),//12
B8_4BIT(00770077),B8_4BIT(70707000),//13
B8_4BIT(00700000),B8_4BIT(70707000),//14
B8_4BIT(00777077),B8_4BIT(70777000),//15
};
const uint8_t TentMask[] =
{
B8_1BIT(00000010),B8_1BIT(20000000),//1
B8_1BIT(00000001),B8_1BIT(00000000),//2
B8_1BIT(00000020),B8_1BIT(10000000),//3
B8_1BIT(00000200),B8_1BIT(01000000),//4
B8_1BIT(00002000),B8_1BIT(00100000),//5
B8_1BIT(00020005),B8_1BIT(00010000),//6
B8_1BIT(00200040),B8_1BIT(50001000),//7
B8_1BIT(02000400),B8_1BIT(05000100),//8
B8_1BIT(33334000),B8_1BIT(00566610),//9
B8_1BIT(00000000),B8_1BIT(00000000),//10
B8_1BIT(00777077),B8_1BIT(70777000),//11
B8_1BIT(00007070),B8_1BIT(00707000),//12
B8_1BIT(00770077),B8_1BIT(70707000),//13
B8_1BIT(00700000),B8_1BIT(70707000),//14
B8_1BIT(00777077),B8_1BIT(70777000),//15
};
const uint8_t SoulData[] =
{
B8_4BIT(01000100),B8_4BIT(10010101),B8_4BIT(10000020),B8_4BIT(00200202),B8_4BIT(02000000),//1
B8_4BIT(00101001),B8_4BIT(01010101),B8_4BIT(01000202),B8_4BIT(02020202),B8_4BIT(02000000),//2
B8_4BIT(00010001),B8_4BIT(01010101),B8_4BIT(01000200),B8_4BIT(02020202),B8_4BIT(02000000),//3
B8_4BIT(00010001),B8_4BIT(01010101),B8_4BIT(10000020),B8_4BIT(02020202),B8_4BIT(02000000),//4
B8_4BIT(00010001),B8_4BIT(01010101),B8_4BIT(01000002),B8_4BIT(02020202),B8_4BIT(02000000),//5
B8_4BIT(00010001),B8_4BIT(01010101),B8_4BIT(01000202),B8_4BIT(02020202),B8_4BIT(02000000),//6
B8_4BIT(00010000),B8_4BIT(10011101),B8_4BIT(01000020),B8_4BIT(00200222),B8_4BIT(02220000),//7
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//8
B8_4BIT(00000000),B8_4BIT(33300330),B8_4BIT(00044000),B8_4BIT(40004004),B8_4BIT(40050000),//9
B8_4BIT(00000000),B8_4BIT(03003003),B8_4BIT(00400404),B8_4BIT(04040404),B8_4BIT(04050000),//10
B8_4BIT(00000000),B8_4BIT(03003000),B8_4BIT(00400004),B8_4BIT(04040404),B8_4BIT(04050000),//11
B8_4BIT(00000000),B8_4BIT(03000330),B8_4BIT(00400004),B8_4BIT(04040404),B8_4BIT(04050000),//12
B8_4BIT(00000000),B8_4BIT(03000003),B8_4BIT(00404404),B8_4BIT(04040404),B8_4BIT(04050000),//13
B8_4BIT(00000000),B8_4BIT(03003003),B8_4BIT(00400404),B8_4BIT(04040404),B8_4BIT(04000000),//14
B8_4BIT(00000000),B8_4BIT(33300330),B8_4BIT(00044000),B8_4BIT(40004004),B8_4BIT(40050000),//15
};
const uint8_t SoulMask[] =
{
B8_1BIT(01001001),B8_1BIT(00000000),//1
B8_1BIT(00101010),B8_1BIT(00000000),//2
B8_1BIT(10101010),B8_1BIT(10000000),//3
B8_1BIT(01011101),B8_1BIT(00000000),//4
B8_1BIT(10111110),B8_1BIT(10000000),//5
B8_1BIT(01111111),B8_1BIT(00000000),//6
B8_1BIT(11111111),B8_1BIT(10000000),//7
B8_1BIT(01111111),B8_1BIT(00000000),//8
B8_1BIT(10111110),B8_1BIT(10000000),//9
B8_1BIT(01011101),B8_1BIT(00000000),//10
B8_1BIT(10101010),B8_1BIT(10000000),//11
B8_1BIT(00101010),B8_1BIT(00000000),//12
B8_1BIT(01001001),B8_1BIT(00000000),//13
};
const uint8_t HundredData[] =
{
B8_4BIT(00000000),B8_4BIT(00000500),B8_4BIT(00000000),//1
B8_4BIT(00022200),B8_4BIT(00005550),B8_4BIT(00000000),//2
B8_4BIT(00022233),B8_4BIT(30005550),B8_4BIT(00000000),//3
B8_4BIT(00022233),B8_4BIT(30005550),B8_4BIT(00000000),//4
B8_4BIT(01022233),B8_4BIT(30005550),B8_4BIT(00000000),//5
B8_4BIT(11122233),B8_4BIT(30005556),B8_4BIT(66000000),//6
B8_4BIT(11122233),B8_4BIT(30005556),B8_4BIT(66070000),//7
B8_4BIT(11122233),B8_4BIT(34445556),B8_4BIT(66777000),//8
B8_4BIT(11122233),B8_4BIT(34445556),B8_4BIT(66777000),//9
B8_4BIT(11122233),B8_4BIT(34445556),B8_4BIT(66777000),//10
B8_4BIT(11122233),B8_4BIT(34445556),B8_4BIT(66777000),//11
B8_4BIT(11122233),B8_4BIT(34445556),B8_4BIT(66777000),//12
B8_4BIT(00000080),B8_4BIT(08880888),B8_4BIT(00000000),//13
B8_4BIT(00000880),B8_4BIT(08080808),B8_4BIT(00000000),//14
B8_4BIT(00000080),B8_4BIT(08080808),B8_4BIT(00000000),//15
B8_4BIT(00000080),B8_4BIT(08080808),B8_4BIT(00000000),//16
B8_4BIT(00000888),B8_4BIT(08880888),B8_4BIT(00000000),//17
};
const uint8_t HundredMask[] =
{
B8_1BIT(00000000),B8_1BIT(00000100),B8_1BIT(00000000),//1
B8_1BIT(00011100),B8_1BIT(00001110),B8_1BIT(00000000),//2
B8_1BIT(00011111),B8_1BIT(10001110),B8_1BIT(00000000),//3
B8_1BIT(00011111),B8_1BIT(10001110),B8_1BIT(00000000),//4
B8_1BIT(01011111),B8_1BIT(10001110),B8_1BIT(00000000),//5
B8_1BIT(11111111),B8_1BIT(10001111),B8_1BIT(11000000),//6
B8_1BIT(11111111),B8_1BIT(10001111),B8_1BIT(11010000),//7
B8_1BIT(11111111),B8_1BIT(11111111),B8_1BIT(11111000),//8
B8_1BIT(11111111),B8_1BIT(11111111),B8_1BIT(11111000),//9
B8_1BIT(11111111),B8_1BIT(11111111),B8_1BIT(11111000),//10
B8_1BIT(11111111),B8_1BIT(11111111),B8_1BIT(11111000),//11
B8_1BIT(11111111),B8_1BIT(11111111),B8_1BIT(11111000),//12
B8_1BIT(00000080),B8_1BIT(08880888),B8_1BIT(00000000),//13
B8_1BIT(00000880),B8_1BIT(08080808),B8_1BIT(00000000),//14
B8_1BIT(00000080),B8_1BIT(08080808),B8_1BIT(00000000),//15
B8_1BIT(00000080),B8_1BIT(08080808),B8_1BIT(00000000),//16
B8_1BIT(00000888),B8_1BIT(08880888),B8_1BIT(00000000),//17
};
const uint8_t OneFiftyData[] =
{
B8_4BIT(00000000),B8_4BIT(00000011),B8_4BIT(11111111),B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(00000000),B8_4BIT(00001120),B8_4BIT(30405060),B8_4BIT(11000000),B8_4BIT(00000000),//2
B8_4BIT(00000000),B8_4BIT(00118011),B8_4BIT(11111111),B8_4BIT(70110000),B8_4BIT(00000000),//3
B8_4BIT(00000000),B8_4BIT(11701120),B8_4BIT(30405060),B8_4BIT(11801100),B8_4BIT(00000000),//4
B8_4BIT(00000001),B8_4BIT(60118020),B8_4BIT(30405060),B8_4BIT(70112010),B8_4BIT(00000000),//5
B8_4BIT(00000010),B8_4BIT(11708020),B8_4BIT(30405060),B8_4BIT(70801131),B8_4BIT(00000000),//6
B8_4BIT(00000151),B8_4BIT(60708020),B8_4BIT(30405060),B8_4BIT(70802010),B8_4BIT(10000000),//7
B8_4BIT(00001010),B8_4BIT(60708020),B8_4BIT(30405060),B8_4BIT(70802031),B8_4BIT(41000000),//8
B8_4BIT(01014150),B8_4BIT(60708020),B8_4BIT(30405060),B8_4BIT(70802030),B8_4BIT(10101000),//9
B8_4BIT(11101050),B8_4BIT(60708020),B8_4BIT(30405060),B8_4BIT(70802030),B8_4BIT(41011100),//10
B8_4BIT(11114050),B8_4BIT(60708020),B8_4BIT(30405060),B8_4BIT(70802030),B8_4BIT(41111100),//11
B8_4BIT(11111111),B8_4BIT(11111111),B8_4BIT(11111111),B8_4BIT(11111111),B8_4BIT(11111111),//12
B8_4BIT(11100000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00011100),//13
B8_4BIT(11100000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00011100),//14
B8_4BIT(11100000),B8_4BIT(00000090),B8_4BIT(09990999),B8_4BIT(00000000),B8_4BIT(00011100),//15
B8_4BIT(00000000),B8_4BIT(00000990),B8_4BIT(09000909),B8_4BIT(00000000),B8_4BIT(00000000),//16
B8_4BIT(00000000),B8_4BIT(00000090),B8_4BIT(09990909),B8_4BIT(00000000),B8_4BIT(00000000),//17
B8_4BIT(00000000),B8_4BIT(00000090),B8_4BIT(00090909),B8_4BIT(00000000),B8_4BIT(00000000),//18
B8_4BIT(00000000),B8_4BIT(00000999),B8_4BIT(09990999),B8_4BIT(00000000),B8_4BIT(00000000),//19
};
const uint8_t OneFiftyMask[] =
{
B8_1BIT(01001001),B8_1BIT(00000000),//1
B8_1BIT(00101010),B8_1BIT(00000000),//2
B8_1BIT(10101010),B8_1BIT(10000000),//3
B8_1BIT(01011101),B8_1BIT(00000000),//4
B8_1BIT(10111110),B8_1BIT(10000000),//5
B8_1BIT(01111111),B8_1BIT(00000000),//6
B8_1BIT(11111111),B8_1BIT(10000000),//7
B8_1BIT(01111111),B8_1BIT(00000000),//8
B8_1BIT(10111110),B8_1BIT(10000000),//9
B8_1BIT(01011101),B8_1BIT(00000000),//10
B8_1BIT(10101010),B8_1BIT(10000000),//11
B8_1BIT(00101010),B8_1BIT(00000000),//12
B8_1BIT(01001001),B8_1BIT(00000000),//13
};
const uint8_t OhFiveOhData[] =
{
B8_4BIT(00000000),B8_4BIT(00001122),B8_4BIT(20000000),//1
B8_4BIT(00000000),B8_4BIT(00311122),B8_4BIT(24400000),//2
B8_4BIT(00000000),B8_4BIT(00331122),B8_4BIT(24400000),//3
B8_4BIT(00000000),B8_4BIT(06333122),B8_4BIT(44550000),//4
B8_4BIT(00000000),B8_4BIT(06633122),B8_4BIT(45550000),//5
B8_4BIT(00000000),B8_4BIT(06666324),B8_4BIT(55550000),//6
B8_4BIT(00000000),B8_4BIT(066666D7),B8_4BIT(77770000),//7
B8_4BIT(00000000),B8_4BIT(0CCCCBA8),B8_4BIT(77770000),//8
B8_4BIT(00000000),B8_4BIT(0CCCBAA9),B8_4BIT(87770000),//9
B8_4BIT(00000000),B8_4BIT(0CCBBAA9),B8_4BIT(88870000),//10
B8_4BIT(00000000),B8_4BIT(0DBBAAA9),B8_4BIT(98800000),//11
B8_4BIT(00000000),B8_4BIT(D0BBAAA9),B8_4BIT(99800000),//12
B8_4BIT(00000D0D),B8_4BIT(000AAAA9),B8_4BIT(99000000),//13
B8_4BIT(0000D0D0),B8_4BIT(0DDD0DDD),B8_4BIT(0DDD0000),//14
B8_4BIT(0000DD00),B8_4BIT(0D0D0D00),B8_4BIT(0D0D0000),//15
B8_4BIT(00000000),B8_4BIT(0D0D0DDD),B8_4BIT(0D0D0000),//16
B8_4BIT(00000000),B8_4BIT(0D0D000D),B8_4BIT(0D0D0000),//17
B8_4BIT(00000000),B8_4BIT(0DDD0DDD),B8_4BIT(0DDD0000),//18
};
const uint8_t OhFiveOhMask[] =
{
B8_1BIT(00011111),B8_1BIT(11000000),//1
B8_1BIT(01111111),B8_1BIT(11110000),//2
B8_1BIT(01111111),B8_1BIT(11110000),//3
B8_1BIT(11111111),B8_1BIT(11111000),//4
B8_1BIT(11111111),B8_1BIT(11111000),//5
B8_1BIT(11111111),B8_1BIT(11111000),//6
B8_1BIT(11111111),B8_1BIT(11111000),//7
B8_1BIT(11111111),B8_1BIT(11111000),//8
B8_1BIT(11111111),B8_1BIT(11111000),//9
B8_1BIT(11111111),B8_1BIT(11111000),//10
B8_1BIT(01111111),B8_1BIT(11110000),//11
B8_1BIT(01111111),B8_1BIT(11110000),//12
B8_1BIT(00111111),B8_1BIT(11100000),//13
B8_1BIT(01110111),B8_1BIT(01110000),//14
B8_1BIT(01010100),B8_1BIT(01010000),//15
B8_1BIT(01010111),B8_1BIT(01010000),//16
B8_1BIT(01010001),B8_1BIT(01010000),//17
B8_1BIT(01110111),B8_1BIT(01110000),//18
};
const uint8_t AnBData[] =
{
B8_4BIT(00001100),B8_4BIT(10000000),B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(00010010),B8_4BIT(10000000),B8_4BIT(00000000),B8_4BIT(00000000),//2
B8_4BIT(00011110),B8_4BIT(11101110),B8_4BIT(10100100),B8_4BIT(00000000),//3
B8_4BIT(00010010),B8_4BIT(10101010),B8_4BIT(10101010),B8_4BIT(00000000),//4
B8_4BIT(00010010),B8_4BIT(10101010),B8_4BIT(10101110),B8_4BIT(00000000),//5
B8_4BIT(00010010),B8_4BIT(10101010),B8_4BIT(10101000),B8_4BIT(00000000),//6
B8_4BIT(00010010),B8_4BIT(11101110),B8_4BIT(01000110),B8_4BIT(00000000),//7
B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//8
B8_4BIT(01010001),B8_4BIT(11000000),B8_4BIT(00000000),B8_4BIT(00000010),//9
B8_4BIT(01000101),B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000010),//10
B8_4BIT(00100011),B8_4BIT(00100100),B8_4BIT(10101110),B8_4BIT(11101110),//11
B8_4BIT(01000101),B8_4BIT(11001010),B8_4BIT(10101010),B8_4BIT(10101010),//12
B8_4BIT(10001001),B8_4BIT(00101110),B8_4BIT(10101010),B8_4BIT(10101010),//13
B8_4BIT(10010101),B8_4BIT(00101000),B8_4BIT(10101010),B8_4BIT(10101010),//14
B8_4BIT(10000101),B8_4BIT(11000110),B8_4BIT(01101110),B8_4BIT(10101110),//15
B8_4BIT(01111000),B8_4BIT(00000000),B8_4BIT(00100000),B8_4BIT(00000000),//16
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(01000000),B8_4BIT(00000000),//17
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(10000000),B8_4BIT(00000000),//18
};
const uint8_t AnBMask[] =
{
B8_1BIT(00001110),B8_1BIT(00000000),B8_1BIT(00000000),B8_1BIT(00000000),//1
B8_1BIT(00001010),B8_1BIT(10000000),B8_1BIT(00000000),B8_1BIT(00000000),//2
B8_1BIT(00001110),B8_1BIT(11101110),B8_1BIT(10100100),B8_1BIT(00000000),//3
B8_1BIT(00001010),B8_1BIT(10101010),B8_1BIT(10101010),B8_1BIT(00000000),//4
B8_1BIT(00001010),B8_1BIT(10101010),B8_1BIT(10101110),B8_1BIT(00000000),//5
B8_1BIT(00001010),B8_1BIT(10101010),B8_1BIT(10101000),B8_1BIT(00000000),//6
B8_1BIT(00001010),B8_1BIT(11101110),B8_1BIT(01001110),B8_1BIT(00000000),//7
B8_1BIT(00100000),B8_1BIT(00000000),B8_1BIT(00000000),B8_1BIT(00000000),//8
B8_1BIT(01010001),B8_1BIT(11000000),B8_1BIT(00000000),B8_1BIT(00000000),//9
B8_1BIT(01000101),B8_1BIT(00100000),B8_1BIT(00000000),B8_1BIT(00000000),//10
B8_1BIT(00100011),B8_1BIT(00100100),B8_1BIT(10101110),B8_1BIT(11101110),//11
B8_1BIT(01000101),B8_1BIT(11001010),B8_1BIT(10101010),B8_1BIT(10101010),//12
B8_1BIT(10001001),B8_1BIT(00101110),B8_1BIT(10101010),B8_1BIT(10101010),//13
B8_1BIT(10010101),B8_1BIT(00101000),B8_1BIT(10101010),B8_1BIT(10101010),//14
B8_1BIT(10000101),B8_1BIT(11001110),B8_1BIT(01101110),B8_1BIT(10101110),//15
B8_1BIT(01111000),B8_1BIT(00000000),B8_1BIT(00100000),B8_1BIT(00000000),//16
B8_1BIT(00000000),B8_1BIT(00000000),B8_1BIT(01000000),B8_1BIT(00000000),//17
B8_1BIT(00000000),B8_1BIT(00000090),B8_1BIT(10000000),B8_1BIT(00000000),//18
};
const uint8_t AnBSmallData[] =
{
B8_4BIT(00001100),B8_4BIT(00000000),//1
B8_4BIT(00010010),B8_4BIT(00000000),//2
B8_4BIT(00011110),B8_4BIT(00000000),//3
B8_4BIT(00010010),B8_4BIT(00000000),//4
B8_4BIT(00010010),B8_4BIT(00000000),//5
B8_4BIT(00010010),B8_4BIT(00000000),//6
B8_4BIT(00010010),B8_4BIT(00000000),//7
B8_4BIT(00100000),B8_4BIT(00000000),//8
B8_4BIT(01010001),B8_4BIT(11000000),//9
B8_4BIT(01000101),B8_4BIT(00100000),//10
B8_4BIT(00100011),B8_4BIT(00100000),//11
B8_4BIT(01000101),B8_4BIT(11000000),//12
B8_4BIT(10001001),B8_4BIT(00100000),//13
B8_4BIT(10010101),B8_4BIT(00100000),//14
B8_4BIT(10000101),B8_4BIT(11000000),//15
B8_4BIT(01111000),B8_4BIT(00000000),//16
};
const uint8_t AnBSmallMask[] =
{
B8_1BIT(00011110),B8_1BIT(00000000),//1
B8_1BIT(00010010),B8_1BIT(00000000),//2
B8_1BIT(00011110),B8_1BIT(00000000),//3
B8_1BIT(00010010),B8_1BIT(00000000),//4
B8_1BIT(00010010),B8_1BIT(00000000),//5
B8_1BIT(00010010),B8_1BIT(00000000),//6
B8_1BIT(00010010),B8_1BIT(00000000),//7
B8_1BIT(00100000),B8_1BIT(00000000),//8
B8_1BIT(01010001),B8_1BIT(11000000),//9
B8_1BIT(01000101),B8_1BIT(00100000),//10
B8_1BIT(00100011),B8_1BIT(00100000),//11
B8_1BIT(01000101),B8_1BIT(11000000),//12
B8_1BIT(10001001),B8_1BIT(00100000),//13
B8_1BIT(10010101),B8_1BIT(00100000),//14
B8_1BIT(10000101),B8_1BIT(11000000),//15
B8_1BIT(01111000),B8_1BIT(00000000),//16
};
const uint8_t TwoHundredData[] =
{
B8_4BIT(00000100),B8_4BIT(00001000),//1
B8_4BIT(00000010),B8_4BIT(00010000),//2
B8_4BIT(00000001),B8_4BIT(11100000),//3
B8_4BIT(00000000),B8_4BIT(01000000),//4
B8_4BIT(01110000),B8_4BIT(01000000),//5
B8_4BIT(00100000),B8_4BIT(11100000),//6
B8_4BIT(00010001),B8_4BIT(00011100),//7
B8_4BIT(00001010),B8_4BIT(00123410),//8
B8_4BIT(00000100),B8_4BIT(01563471),//9
B8_4BIT(01101000),B8_4BIT(01887781),//10
B8_4BIT(13410000),B8_4BIT(01973651),//11
B8_4BIT(17710000),B8_4BIT(01743261),//12
B8_4BIT(13610000),B8_4BIT(00143210),//13
B8_4BIT(01100000),B8_4BIT(00011100),//14
B8_4BIT(00AAA0AA),B8_4BIT(A0AAA000),//15
B8_4BIT(0000A0A0),B8_4BIT(A0A0A000),//16
B8_4BIT(00AA00A0),B8_4BIT(A0A0A000),//17
B8_4BIT(00A000A0),B8_4BIT(A0A0A000),//18
B8_4BIT(00AAA0AA),B8_4BIT(A0AAA000),//19
};
const uint8_t TwoHundredMask[] =
{
B8_1BIT(00000100),B8_1BIT(00001000),//1
B8_1BIT(00000010),B8_1BIT(00010000),//2
B8_1BIT(00000001),B8_1BIT(11100000),//3
B8_1BIT(00000000),B8_1BIT(01000000),//4
B8_1BIT(01110000),B8_1BIT(01000000),//5
B8_1BIT(00100000),B8_1BIT(11100000),//6
B8_1BIT(00010001),B8_1BIT(00011100),//7
B8_1BIT(00001010),B8_1BIT(00123410),//8
B8_1BIT(00000100),B8_1BIT(01563471),//9
B8_1BIT(01101000),B8_1BIT(01887781),//10
B8_1BIT(13410000),B8_1BIT(01973651),//11
B8_1BIT(17710000),B8_1BIT(01743261),//12
B8_1BIT(13610000),B8_1BIT(00143210),//13
B8_1BIT(01100000),B8_1BIT(00011100),//14
B8_1BIT(00AAA0AA),B8_1BIT(A0AAA000),//15
B8_1BIT(0000A0A0),B8_1BIT(A0A0A000),//16
B8_1BIT(00AA00A0),B8_1BIT(A0A0A000),//17
B8_1BIT(00A000A0),B8_1BIT(A0A0A000),//18
B8_1BIT(00AAA0AA),B8_1BIT(A0AAA000),//19
};
const uint8_t ThreeHundredData[] =
{
B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(00011000),B8_4BIT(22000330),//2
B8_4BIT(00100102),B8_4BIT(00203003),//3
B8_4BIT(00100102),B8_4BIT(00203003),//4
B8_4BIT(00000100),B8_4BIT(00200003),//5
B8_4BIT(00001000),B8_4BIT(02000030),//6
B8_4BIT(00010000),B8_4BIT(20000300),//7
B8_4BIT(00010000),B8_4BIT(20000300),//8
B8_4BIT(00010000),B8_4BIT(20000300),//9
B8_4BIT(00010000),B8_4BIT(20000300),//10
B8_4BIT(00000000),B8_4BIT(00000000),//11
B8_4BIT(00010000),B8_4BIT(20000300),//12
B8_4BIT(00000000),B8_4BIT(00000000),//13
B8_4BIT(00044404),B8_4BIT(44044400),//14
B8_4BIT(00000404),B8_4BIT(04040400),//15
B8_4BIT(00044404),B8_4BIT(04040400),//16
B8_4BIT(00000404),B8_4BIT(04040400),//17
B8_4BIT(00044404),B8_4BIT(44044400),//18
B8_4BIT(00000000),B8_4BIT(00000000),//19
};
const uint8_t ThreeHundredMask[] =
{
B8_1BIT(00000100),B8_1BIT(00001000),//1
B8_1BIT(00000010),B8_1BIT(00010000),//2
B8_1BIT(00000001),B8_1BIT(11100000),//3
B8_1BIT(00000000),B8_1BIT(01000000),//4
B8_1BIT(01110000),B8_1BIT(01000000),//5
B8_1BIT(00100000),B8_1BIT(11100000),//6
B8_1BIT(00010001),B8_1BIT(00011100),//7
B8_1BIT(00001010),B8_1BIT(00123410),//8
B8_1BIT(00000100),B8_1BIT(01563471),//9
B8_1BIT(01101000),B8_1BIT(01887781),//10
B8_1BIT(13410000),B8_1BIT(01973651),//11
B8_1BIT(17710000),B8_1BIT(01743261),//12
B8_1BIT(13610000),B8_1BIT(00143210),//13
B8_1BIT(01100000),B8_1BIT(00011100),//14
B8_1BIT(00AAA0AA),B8_1BIT(A0AAA000),//15
B8_1BIT(0000A0A0),B8_1BIT(A0A0A000),//16
B8_1BIT(00AA00A0),B8_1BIT(A0A0A000),//17
B8_1BIT(00A000A0),B8_1BIT(A0A0A000),//18
B8_1BIT(00AAA0AA),B8_1BIT(A0AAA000),//19
};
const uint8_t WeData[] =
{
B8_4BIT(01000100),B8_4BIT(00002220),B8_4BIT(00000000),B8_4BIT(03330303),B8_4BIT(00000000),//1
B8_4BIT(01010100),B8_4BIT(00002020),B8_4BIT(00000000),B8_4BIT(03030303),B8_4BIT(00000000),//2
B8_4BIT(01010100),B8_4BIT(10002020),B8_4BIT(20000200),B8_4BIT(03330303),B8_4BIT(00000000),//3
B8_4BIT(01010101),B8_4BIT(01002220),B8_4BIT(22202020),B8_4BIT(03030303),B8_4BIT(00000000),//4
B8_4BIT(01010101),B8_4BIT(11002020),B8_4BIT(20002220),B8_4BIT(03030303),B8_4BIT(00000000),//5
B8_4BIT(01010101),B8_4BIT(00002020),B8_4BIT(20002000),B8_4BIT(03030303),B8_4BIT(00000000),//6
B8_4BIT(00101000),B8_4BIT(11002020),B8_4BIT(20000220),B8_4BIT(03030303),B8_4BIT(00000000),//7
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//8
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//9
B8_4BIT(00004000),B8_4BIT(40000005),B8_4BIT(00050000),B8_4BIT(00000005),B8_4BIT(00606060),//10
B8_4BIT(00004040),B8_4BIT(40000005),B8_4BIT(50050000),B8_4BIT(00000005),B8_4BIT(00606060),//11
B8_4BIT(00004040),B8_4BIT(40040005),B8_4BIT(50050050),B8_4BIT(00500005),B8_4BIT(00606060),//12
B8_4BIT(00004040),B8_4BIT(40404005),B8_4BIT(05050505),B8_4BIT(05050555),B8_4BIT(00606060),//13
B8_4BIT(00004040),B8_4BIT(40444005),B8_4BIT(00550555),B8_4BIT(05550505),B8_4BIT(00606060),//14
B8_4BIT(00004040),B8_4BIT(40400005),B8_4BIT(00550500),B8_4BIT(05000505),B8_4BIT(00000000),//15
B8_4BIT(00000404),B8_4BIT(00044005),B8_4BIT(00050055),B8_4BIT(00550555),B8_4BIT(00606060),//16
};
const uint8_t WeMask[] =
{
B8_4BIT(00001110),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(00001010),B8_4BIT(10000000),B8_4BIT(00000000),B8_4BIT(00000000),//2
B8_4BIT(00001110),B8_4BIT(11101110),B8_4BIT(10100100),B8_4BIT(00000000),//3
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101010),B8_4BIT(00000000),//4
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101110),B8_4BIT(00000000),//5
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101000),B8_4BIT(00000000),//6
B8_4BIT(00001010),B8_4BIT(11101110),B8_4BIT(01001110),B8_4BIT(00000000),//7
B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//8
B8_4BIT(01010001),B8_4BIT(11000000),B8_4BIT(00000000),B8_4BIT(00000000),//9
B8_4BIT(01000101),B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000000),//10
B8_4BIT(00100011),B8_4BIT(00100100),B8_4BIT(10101110),B8_4BIT(11101110),//11
B8_4BIT(01000101),B8_4BIT(11001010),B8_4BIT(10101010),B8_4BIT(10101010),//12
B8_4BIT(10001001),B8_4BIT(00101110),B8_4BIT(10101010),B8_4BIT(10101010),//13
B8_4BIT(10010101),B8_4BIT(00101000),B8_4BIT(10101010),B8_4BIT(10101010),//14
B8_4BIT(10000101),B8_4BIT(11001110),B8_4BIT(01101110),B8_4BIT(10101110),//15
B8_4BIT(01111000),B8_4BIT(00000000),B8_4BIT(00100000),B8_4BIT(00000000),//16
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(01000000),B8_4BIT(00000000),//17
B8_4BIT(00000000),B8_4BIT(00000090),B8_4BIT(10000000),B8_4BIT(00000000),//18
};
const uint8_t TakeSoulData[] =
{
B8_4BIT(10001000),B8_4BIT(00000022),B8_4BIT(00000000),B8_4BIT(00300030),B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(01010000),B8_4BIT(00000200),B8_4BIT(00000000),B8_4BIT(00330030),B8_4BIT(00000000),B8_4BIT(00000000),//2
B8_4BIT(00100000),B8_4BIT(00000200),B8_4BIT(00000000),B8_4BIT(00330030),B8_4BIT(00000000),B8_4BIT(00000000),//3
B8_4BIT(00101110),B8_4BIT(10100200),B8_4BIT(02200220),B8_4BIT(00303030),B8_4BIT(03003030),B8_4BIT(03003000),//4
B8_4BIT(00101010),B8_4BIT(10100200),B8_4BIT(00020202),B8_4BIT(00300330),B8_4BIT(30303030),B8_4BIT(30303330),//5
B8_4BIT(00101010),B8_4BIT(10100200),B8_4BIT(02220202),B8_4BIT(00300330),B8_4BIT(33303030),B8_4BIT(33303000),//6
B8_4BIT(00101010),B8_4BIT(10100200),B8_4BIT(02020202),B8_4BIT(00300030),B8_4BIT(30003030),B8_4BIT(30003000),//7
B8_4BIT(00101110),B8_4BIT(11100022),B8_4BIT(00220202),B8_4BIT(00300030),B8_4BIT(03300300),B8_4BIT(03303000),//8
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//9
B8_4BIT(00044444),B8_4BIT(00040000),B8_4BIT(00005000),B8_4BIT(50000000),B8_4BIT(66000000),B8_4BIT(00006000),//10
B8_4BIT(00000400),B8_4BIT(00040000),B8_4BIT(00005505),B8_4BIT(50000006),B8_4BIT(00600000),B8_4BIT(00006000),//11
B8_4BIT(00000400),B8_4BIT(00040000),B8_4BIT(00005050),B8_4BIT(50000006),B8_4BIT(00000000),B8_4BIT(00006000),//12
B8_4BIT(00000404),B8_4BIT(40040400),B8_4BIT(40005000),B8_4BIT(50505000),B8_4BIT(66006660),B8_4BIT(60606000),//13
B8_4BIT(00000400),B8_4BIT(04044004),B8_4BIT(04005000),B8_4BIT(50505000),B8_4BIT(00606060),B8_4BIT(60606000),//14
B8_4BIT(00000404),B8_4BIT(44040404),B8_4BIT(44005000),B8_4BIT(50505006),B8_4BIT(00606060),B8_4BIT(60606000),//15
B8_4BIT(00000404),B8_4BIT(04040404),B8_4BIT(00005000),B8_4BIT(50505006),B8_4BIT(00606060),B8_4BIT(60606000),//16
B8_4BIT(00000400),B8_4BIT(44040400),B8_4BIT(44005000),B8_4BIT(50050000),B8_4BIT(66006660),B8_4BIT(66606000),//17
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00050000),B8_4BIT(00000000),B8_4BIT(00000000),//18
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(05500000),B8_4BIT(00000000),B8_4BIT(00000000),//19
};
const uint8_t TakeSoulMask[] =
{
B8_4BIT(00001110),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//1
B8_4BIT(00001010),B8_4BIT(10000000),B8_4BIT(00000000),B8_4BIT(00000000),//2
B8_4BIT(00001110),B8_4BIT(11101110),B8_4BIT(10100100),B8_4BIT(00000000),//3
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101010),B8_4BIT(00000000),//4
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101110),B8_4BIT(00000000),//5
B8_4BIT(00001010),B8_4BIT(10101010),B8_4BIT(10101000),B8_4BIT(00000000),//6
B8_4BIT(00001010),B8_4BIT(11101110),B8_4BIT(01001110),B8_4BIT(00000000),//7
B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(00000000),//8
B8_4BIT(01010001),B8_4BIT(11000000),B8_4BIT(00000000),B8_4BIT(00000000),//9
B8_4BIT(01000101),B8_4BIT(00100000),B8_4BIT(00000000),B8_4BIT(00000000),//10
B8_4BIT(00100011),B8_4BIT(00100100),B8_4BIT(10101110),B8_4BIT(11101110),//11
B8_4BIT(01000101),B8_4BIT(11001010),B8_4BIT(10101010),B8_4BIT(10101010),//12
B8_4BIT(10001001),B8_4BIT(00101110),B8_4BIT(10101010),B8_4BIT(10101010),//13
B8_4BIT(10010101),B8_4BIT(00101000),B8_4BIT(10101010),B8_4BIT(10101010),//14
B8_4BIT(10000101),B8_4BIT(11001110),B8_4BIT(01101110),B8_4BIT(10101110),//15
B8_4BIT(01111000),B8_4BIT(00000000),B8_4BIT(00100000),B8_4BIT(00000000),//16
B8_4BIT(00000000),B8_4BIT(00000000),B8_4BIT(01000000),B8_4BIT(00000000),//17
B8_4BIT(00000000),B8_4BIT(00000090),B8_4BIT(10000000),B8_4BIT(00000000),//18
};
struct CRGB RibbonColTable[8] = { CRGB:: DarkRed,
CRGB:: Purple,
CRGB:: Aqua,
CRGB:: Yellow,
CRGB:: Green,
CRGB:: Grey,
CRGB:: DarkBlue,
CRGB:: DarkOrange};
struct CRGB CGColTable[11] = { CRGB:: Red,
CRGB:: MidnightBlue,
CRGB:: Green,
CRGB:: MediumVioletRed,
CRGB:: Yellow,
CRGB:: Turquoise,
CRGB:: White,
CRGB:: DarkRed,
CRGB:: FireBrick,
CRGB:: MediumBlue,
CRGB:: ForestGreen};
CRGB ColorSwirl[6] = {
CRGB::Turquoise,
CRGB::Snow,
CRGB::DarkMagenta,
CRGB::LightGoldenrodYellow,
CRGB::DarkBlue,
CRGB::SpringGreen};
struct CRGB TentColTable[7] = { CRGB:: Orange,
CRGB:: Green,
CRGB:: Red,
CRGB:: Turquoise,
CRGB:: Purple,
CRGB:: Yellow,
CRGB:: Grey};
struct CRGB SoulColTable[8] = { CRGB:: Purple,
CRGB:: DarkOrange,
CRGB:: Yellow,
CRGB:: DarkBlue,
CRGB:: White,
CRGB:: Grey,
CRGB:: DarkBlue,
CRGB:: DarkOrange};
struct CRGB HundredColTable[8] = {CRGB:: DarkBlue,
CRGB:: Orange,
CRGB:: Red,
CRGB:: HotPink,
CRGB:: Purple,
CRGB:: Green,
CRGB:: LightBlue,
CRGB:: Gray};
struct CRGB OneFiftyColTable[9] ={CRGB:: Grey,
CRGB:: Green,
CRGB:: DarkRed,
CRGB:: Turquoise,
CRGB:: Orange,
CRGB:: Yellow,
CRGB:: Purple,
CRGB:: HotPink,
CRGB:: Grey};
struct CRGB OhFiveOhColTable[13] = { CRGB:: Orchid,
CRGB:: Red,
CRGB:: DarkViolet,
CRGB:: Orange,
CRGB:: Yellow,
CRGB:: Indigo,
CRGB:: LawnGreen,
CRGB:: LimeGreen,
CRGB:: DarkGreen,
CRGB:: SteelBlue,
CRGB:: MediumBlue,
CRGB:: MidnightBlue,
CRGB:: Grey};
struct CRGB AnBColTable[1] = { CRGB:: Grey};
struct CRGB TwoHundredColTable[13] = { CRGB:: DarkGrey,
CRGB:: MidnightBlue,
CRGB:: DarkRed,
CRGB:: Yellow,
CRGB:: Orange,
CRGB:: Purple,
CRGB:: Green,
CRGB:: Turquoise,
CRGB:: Pink,
CRGB:: Grey,
CRGB:: MediumBlue,
CRGB:: MidnightBlue,
CRGB:: Grey};
struct CRGB ThreeHundredColTable[4] = { CRGB:: Red,
CRGB:: DarkBlue,
CRGB:: Green,
CRGB:: Grey};
struct CRGB WeColTable[9] = {CRGB:: Yellow,
CRGB:: Purple,
CRGB:: HotPink,
CRGB:: Turquoise,
CRGB:: Orange,
CRGB:: Grey,
CRGB:: Purple,
CRGB:: HotPink,
CRGB:: Grey};
struct CRGB TakeSoulTable[9] = {CRGB:: Yellow,
CRGB:: Purple,
CRGB:: HotPink,
CRGB:: Turquoise,
CRGB:: Orange,
CRGB:: Blue,
CRGB:: Purple,
CRGB:: HotPink,
CRGB:: Grey};
cLEDSprites Sprites(&leds);
cSprite Ribbon(RIBBON_WIDTH, RIBBON_HEIGHT, RibbonData, 1, _4BIT, RibbonColTable, RibbonMask);
cSprite CG(CG_WIDTH, CG_HEIGHT, CGData, 1, _5BIT, CGColTable, CGMask);
cSprite Tent(TENT_WIDTH, TENT_HEIGHT, TentData, 1, _4BIT, TentColTable, TentMask);
cSprite Soul(SOUL_WIDTH, SOUL_HEIGHT, SoulData, 1, _4BIT, SoulColTable, SoulMask);
cSprite Hundred(HUNDRED_WIDTH, HUNDRED_HEIGHT, HundredData, 1, _4BIT, HundredColTable, HundredMask);
cSprite OneFifty(ONEFIFTY_WIDTH, ONEFIFTY_HEIGHT, OneFiftyData, 1, _4BIT, OneFiftyColTable, OneFiftyMask);
cSprite OhFiveOh(OHFIVEOH_WIDTH, OHFIVEOH_HEIGHT, OhFiveOhData, 1, _4BIT, OhFiveOhColTable, OhFiveOhMask);
cSprite AnB(ANB_WIDTH, ANB_HEIGHT, AnBData, 1, _4BIT, AnBColTable, AnBMask);
cSprite AnBSmall(ANBSMALL_WIDTH, ANBSMALL_HEIGHT, AnBSmallData, 1, _4BIT, AnBColTable, AnBSmallMask);
cSprite TwoHundred(TWOHUNDRED_WIDTH, TWOHUNDRED_HEIGHT, TwoHundredData, 1, _4BIT, TwoHundredColTable, TwoHundredMask);
cSprite ThreeHundred(THREEHUNDRED_WIDTH, THREEHUNDRED_HEIGHT, ThreeHundredData, 1, _4BIT, ThreeHundredColTable, ThreeHundredMask);
cSprite We(WE_WIDTH, WE_HEIGHT, WeData, 1, _4BIT, WeColTable, WeMask);
cSprite TakeSoul(TAKESOUL_WIDTH, TAKESOUL_HEIGHT, TakeSoulData, 1, _4BIT, TakeSoulTable, TakeSoulMask);
#define MAX_SQUARES 5
#define NUM_COLS 5
cSprite Anjuna[MAX_SQUARES];
cSprite Tents[MAX_SQUARES];
struct CRGB ColTabs[MAX_SQUARES][NUM_COLS];
int NumSquares;
int AnjunaSetupFlag = 0;
int TentSetupFlag = 0;
void setup() {
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
//FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(strip, NUM_LEDS).setCorrection(TypicalSMD5050);
FastLED.setBrightness(25);
FastLED.clear(true);
delay(1000);
FastLED.show();
Ribbon.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +1/*XChange*/, 1/*XRate*/, +1/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
CG.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +1/*XChange*/, 1/*XRate*/, +1/*YChange*/,1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Tent.SetPositionFrameMotionOptions(12/*X*/, 3/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 1/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Soul.SetPositionFrameMotionOptions(38/*X*/, 3/*Y*/, 0/*Frame*/, 0/*FrameRate*/, -1/*XChange*/, 1/*XRate*/, +0/*YChange*/, 0/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_Y_KEEPIN);
Hundred.SetPositionFrameMotionOptions(8/*X*/, 2/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 0/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
OneFifty.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 1/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
OhFiveOh.SetPositionFrameMotionOptions(4/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 1/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
AnB.SetPositionFrameMotionOptions(43/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, -1/*XChange*/, 1/*XRate*/, +0/*YChange*/, 0/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_Y_KEEPIN);
AnBSmall.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +1/*XChange*/, 1/*XRate*/, +1/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
TwoHundred.SetPositionFrameMotionOptions(11/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 1/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
ThreeHundred.SetPositionFrameMotionOptions(10/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +0/*XChange*/, 1/*XRate*/, +0/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
We.SetPositionFrameMotionOptions(38/*X*/, 3/*Y*/, 0/*Frame*/, 0/*FrameRate*/, -1/*XChange*/, 1/*XRate*/, +0/*YChange*/, 0/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_Y_KEEPIN);
TakeSoul.SetPositionFrameMotionOptions(38/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, -1/*XChange*/, 1/*XRate*/, +0/*YChange*/, 0/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_Y_KEEPIN);
Serial.begin(9600);
}
// List of patterns to cycle through. Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = {
AnBlogo,
Anjunalogo,
OhFiveOhlogo,
CGlogo,
Hundredlogo,
Anjunalogo,
TakeSoullogo,
AnBSmalllogo,
Anjunalogo,
OneFiftylogo,
Anjunalogo,
Ribbonlogo,
CGlogo,
TwoHundredlogo,
Anjunalogo,
Tentlogo,
Anjunalogo,
Soullogo,
Anjunalogo,
CGlogo,
Welogo,
Anjunalogo,
ThreeHundredlogo,
Anjunalogo
};
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
void loop()
{
// Call the current pattern function once, updating the 'leds' array
gPatterns[gCurrentPatternNumber]();
FastLED.show();
FastLED.delay(1000/FRAMES_PER_SECOND);
EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow
EVERY_N_SECONDS( 15 ) { nextPattern(); } // change patterns periodically
}
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
void nextPattern()
{
// add one to the current pattern number, and wrap around at the end
gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}
void AnBlogo()
{
Sprites.RemoveAllSprites();
Sprites.AddSprite(&AnB);
FastLED.clear();
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void AnBSmalllogo()
{
Sprites.RemoveAllSprites();
Sprites.AddSprite(&AnBSmall);
FastLED.clear();
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(150);
AnjunaSetupFlag = 0;
}
void Anjunalogo(void)
{
Sprites.RemoveSprite(&Ribbon);
Sprites.RemoveSprite(&Tent);
Sprites.RemoveSprite(&CG);
Sprites.RemoveSprite(&Hundred);
Sprites.RemoveSprite(&OhFiveOh);
Sprites.RemoveSprite(&OneFifty);
Sprites.RemoveSprite(&Soul);
Sprites.RemoveSprite(&AnB);
Sprites.RemoveSprite(&AnBSmall);
Sprites.RemoveSprite(&TwoHundred);
Sprites.RemoveSprite(&ThreeHundred);
Sprites.RemoveSprite(&TwoHundred);
Sprites.RemoveSprite(&TakeSoul);
Sprites.RemoveSprite(&We);
Soul.SetPosition(38,3);
AnB.SetPosition(38,0);
We.SetPosition(38,3);
int16_t x = MATRIX_WIDTH - ANJUNA_WIDTH-1 , y = MATRIX_HEIGHT - ANJUNA_HEIGHT-1;
int8_t xc = -1, yc = 1;
NumSquares = 0;
if (AnjunaSetupFlag == 0) {
while ((NumSquares < MAX_SQUARES) && (x < (MATRIX_WIDTH - ANJUNA_WIDTH) ))
{
for (int i=0; i<NUM_COLS; i++)
ColTabs[NumSquares][i] = CHSV(NumSquares * 171, 255, 200); //127 + (i * 64));
Anjuna[NumSquares].Setup(ANJUNA_WIDTH, ANJUNA_HEIGHT, AnjunaData, 1, _2BIT, ColTabs[NumSquares], AnjunaMask);
//Shape.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +1/*XChange*/, 1/*XRate*/, +1/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Anjuna[NumSquares].SetPositionFrameMotionOptions(x, y, 0, 0, xc, 2, yc, 2, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Sprites.AddSprite(&Anjuna[NumSquares]);
++NumSquares;
x += (((ANJUNA_WIDTH * 5) / 3) * xc);
if (x <= 0)
{
x = abs(x);
xc = +1;
}
y += yc;
if ( (y == 0) || (y == (MATRIX_HEIGHT - ANJUNA_HEIGHT)) )
yc = 0 - yc;
}
}
AnjunaSetupFlag = 1;
FastLED.clear();
Sprites.UpdateSprites();
for (int i=0; i<NumSquares; i++)
{
if (Anjuna[i].GetFlags() & SPRITE_EDGE_X_MAX)
Sprites.ChangePriority(&Anjuna[i], SPR_BACK);
else if (Anjuna[i].GetFlags() & SPRITE_EDGE_X_MIN)
Sprites.ChangePriority(&Anjuna[i], SPR_FRONT);
}
Sprites.RenderSprites();
FastLED.show();
//delay(25);
}
void CGlogo()
{
Sprites.RemoveAllSprites();
Sprites.RemoveSprite(&Ribbon);
Sprites.RemoveSprite(&Tent);
Sprites.RemoveSprite(&CG);
Sprites.RemoveSprite(&Hundred);
Sprites.RemoveSprite(&OhFiveOh);
Sprites.RemoveSprite(&OneFifty);
Sprites.RemoveSprite(&Soul);
Sprites.RemoveSprite(&AnB);
Sprites.RemoveSprite(&AnBSmall);
Sprites.RemoveSprite(&TwoHundred);
Sprites.RemoveSprite(&ThreeHundred);
Sprites.RemoveSprite(&TwoHundred);
Sprites.RemoveSprite(&TakeSoul);
Sprites.RemoveSprite(&We);
Sprites.AddSprite(&CG);
FastLED.clear();
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Hundredlogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&Hundred);
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void OhFiveOhlogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&OhFiveOh);
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void OneFiftylogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&OneFifty);
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Ribbonlogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&Ribbon);
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Soullogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&Soul);
Sprites.UpdateSprites();
Sprites.RenderSprites();
addGlitter();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void TakeSoullogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&TakeSoul);
Sprites.UpdateSprites();
Sprites.RenderSprites();
addGlitter();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Tentlogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&Tent);
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Tentslogo(void)
{
Sprites.RemoveSprite(&Ribbon);
// Sprites.RemoveSprite(&Anjuna);
Sprites.RemoveSprite(&CG);
Serial.println("I'm Here");
int16_t x = MATRIX_WIDTH - TENT_WIDTH-1 , y = MATRIX_HEIGHT - TENT_HEIGHT-1;
int8_t xc = -1, yc = 1;
NumSquares = 0;
if (TentSetupFlag == 0) {
while ((NumSquares < MAX_SQUARES) && (x < (MATRIX_WIDTH - TENT_WIDTH) ))
{
Serial.println("Here");
Serial.println(NumSquares);
for (int i=0; i<NUM_COLS; i++)
ColTabs[NumSquares][i] = CHSV(NumSquares * 171, 255, 127 + (i * 64));
Tents[NumSquares].Setup(TENT_WIDTH, TENT_HEIGHT, TentData, 1, _4BIT, TentColTable, TentMask);
//Shape.SetPositionFrameMotionOptions(0/*X*/, 0/*Y*/, 0/*Frame*/, 0/*FrameRate*/, +1/*XChange*/, 1/*XRate*/, +1/*YChange*/, 1/*YRate*/, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Tents[NumSquares].SetPositionFrameMotionOptions(x, y, 0, 0, xc, 2, yc, 2, SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN);
Sprites.AddSprite(&Tents[NumSquares]);
++NumSquares;
x += (((TENT_WIDTH * 5) / 3) * xc);
if (x <= 0)
{
x = abs(x);
xc = +1;
}
y += yc;
if ( (y == 0) || (y == (MATRIX_HEIGHT - TENT_HEIGHT)) )
yc = 0 - yc;
}
}
TentSetupFlag = 1;
FastLED.clear();
Sprites.UpdateSprites();
for (int i=0; i<NumSquares; i++)
{
if (Tents[i].GetFlags() & SPRITE_EDGE_X_MAX)
Sprites.ChangePriority(&Tents[i], SPR_BACK);
else if (Tents[i].GetFlags() & SPRITE_EDGE_X_MIN)
Sprites.ChangePriority(&Tents[i], SPR_FRONT);
}
Sprites.RenderSprites();
FastLED.show();
//delay(25);
}
void ThreeHundredlogo()
{
Sprites.RemoveAllSprites();
Sprites.AddSprite(&ThreeHundred);
FastLED.clear();
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void TwoHundredlogo()
{
Sprites.RemoveAllSprites();
Sprites.RemoveSprite(&Ribbon);
Sprites.RemoveSprite(&Tent);
Sprites.RemoveSprite(&CG);
Sprites.RemoveSprite(&Hundred);
Sprites.RemoveSprite(&OhFiveOh);
Sprites.RemoveSprite(&OneFifty);
Sprites.RemoveSprite(&Soul);
Sprites.RemoveSprite(&AnB);
Sprites.RemoveSprite(&AnBSmall);
Sprites.RemoveSprite(&ThreeHundred);
Sprites.RemoveSprite(&TwoHundred);
Sprites.RemoveSprite(&TakeSoul);
Sprites.RemoveSprite(&We);
Sprites.AddSprite(&TwoHundred);
FastLED.clear();
Sprites.UpdateSprites();
Sprites.RenderSprites();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
void Welogo(void)
{
Sprites.RemoveAllSprites();
FastLED.clear();
Sprites.AddSprite(&We);
Sprites.UpdateSprites();
Sprites.RenderSprites();
addGlitter();
FastLED.show();
delay(50);
AnjunaSetupFlag = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.