#include <FastLED.h>
uint8_t brightness_wifi = 255;
//App brightness value (0-255) - This can be changed by the app
uint8_t speed_wifi = 1;
//App speed value (0: low, 1: medium, 2: high) - This can be changed in the app
uint8_t features_wifi = 1;
//App speed value (0: subtle, 1: moderate, 2: intense) - This can be changed in the app
// These settings below should be variable, these are for 18x16 (x-Y) setup.
uint8_t X_BULBS = 18;
uint8_t Y_BULBS = 16;
#define NUM_LEDS 288 //(X_BULBS*Y_BULBS);
// Fastled defintions
#define LED_PIN 9
CRGB leds[NUM_LEDS];
// For one panel, mapping is:
//
// [42,43,44,45,46,47]
// [41,40,39,38,37,36]
// [30,31,32,33,34,35]
// [29,28,27,26,25,24]
// [18,19,20,21,22,23]
// [17,16,15,14,13,12]
// [6, 7, 8, 9 ,10,11]
// [5, 4, 3, 2 ,1 ,0 ]
// For 3 x 2 SETUP:
//
// [0][1][2]
// [3][4][5]
// Mapping for to get correct LED value based on coordinates, this changes if matrix size changes
// Provide X and Y value, it returns the LED number
// GetMap[Y][X] returns LED number
int GetMap[16][18] =
{
{42,43,44,45,46,47,90,91,92,93,94,95,138,139,140,141,142,143},
{41,40,39,38,37,36,89,88,87,86,85,84,137,136,135,134,133,132},
{30,31,32,33,34,35,78,79,80,81,82,83,126,127,128,129,130,131},
{29,28,27,26,25,24,77,76,75,74,73,72,125,124,123,122,121,120},
{18,19,20,21,22,23,66,67,68,69,70,71,114,115,116,117,118,119},
{17,16,15,14,13,12,65,64,63,62,61,60,113,112,111,110,109,108},
{6,7,8,9,10,11,54,55,56,57,58,59,102,103,104,105,106,107},
{5,4,3,2,1,0,53,52,51,50,49,48,101,100,99,98,97,96},
{186,187,188,189,190,191,234,235,236,237,238,239,282,283,284,285,286,287},
{185,184,183,182,181,180,233,232,231,230,229,228,281,280,279,278,277,276},
{174,175,176,177,178,179,222,223,224,225,226,227,270,271,272,273,274,275},
{173,172,171,170,169,168,221,220,219,218,217,216,269,268,267,266,265,264},
{162,163,164,165,166,167,210,211,212,213,214,215,258,259,260,261,262,263},
{161,160,159,158,157,156,209,208,207,206,205,204,257,256,255,254,253,252},
{150,151,152,153,154,155,198,199,200,201,202,203,246,247,248,249,250,251},
{149,148,147,146,145,144,197,196,195,194,193,192,245,244,243,242,241,240}
};
#include "GenerateMap.h"
#include "E1.h" //Effect 1
void setup() {
FastLED.addLeds<WS2811, LED_PIN, GRB>(leds, NUM_LEDS); // Add our LED strip to the FastLED library
Serial.begin(9600);
Serial.println("Serial monitor working!");
}
void loop() {
//GenerateMap();
E1();
}