diff --git a/esp8266-fastled-webserver/Map.cpp b/esp8266-fastled-webserver/Map.cpp index 16f590e6..6a847456 100644 --- a/esp8266-fastled-webserver/Map.cpp +++ b/esp8266-fastled-webserver/Map.cpp @@ -116,6 +116,15 @@ // const uint8_t tentacle4[8] { 40, 41, 42, 43, 44, 45, 46, 47 }; // const uint8_t tentacle5[8] { 48, 49, 50, 51, 52, 53, 54, 55 }; // const uint8_t tentacle6[8] { 56, 57, 58, 59, 60, 61, 62, 63 }; +#elif defined(PRODUCT_CHAMAELEON64) + const uint8_t coordsX[NUM_PIXELS] { 255, 240, 234, 216, 221, 224, 204, 204, 201, 185, 196, 214, 228, 187, 188, 178, 156, 138, 129, 124, 127, 167, 175, 161, 146, 153, 141, 124, 105, 121, 127, 106, 106, 94, 89, 80, 74, 65, 54, 44, 26, 33, 38, 59, 80, 93, 103, 112, 14, 15, 5, 0, 4, 17, 42, 66, 81, 76, 53, 33, 37, 59, 63, 47 }; + const uint8_t coordsY[NUM_PIXELS] { 127, 155, 121, 122, 155, 191, 209, 175, 139, 105, 82, 60, 43, 165, 193, 135, 144, 142, 110, 75, 36, 171, 225, 199, 172, 244, 211, 161, 150, 194, 244, 255, 219, 187, 237, 209, 173, 233, 192, 216, 233, 187, 155, 150, 138, 105, 74, 40, 184, 154, 124, 90, 53, 19, 0, 9, 39, 80, 96, 76, 33, 30, 63, 57 }; + const uint8_t angles[NUM_PIXELS] { 179, 192, 176, 175, 195, 212, 225, 210, 188, 158, 146, 141, 139, 211, 226, 187, 209, 233, 95, 85, 89, 226, 243, 244, 246, 256, 259, 274, 313, 274, 269, 278, 282, 298, 288, 299, 318, 299, 317, 312, 312, 326, 341, 340, 346, 31, 65, 79, 332, 345, 0, 15, 30, 43, 55, 61, 61, 41, 22, 27, 45, 54, 44, 40 }; + const uint8_t radii[NUM_PIXELS] { 206, 185, 168, 135, 150, 185, 178, 137, 107, 83, 122, 172, 213, 101, 134, 64, 32, 3, 0, 65, 137, 80, 172, 116, 59, 191, 126, 31, 28, 93, 186, 210, 144, 95, 185, 144, 99, 197, 150, 195, 241, 175, 141, 101, 57, 43, 77, 132, 204, 182, 196, 215, 236, 255, 253, 215, 153, 97, 118, 167, 210, 188, 137, 166 }; + static_assert(NUM_PIXELS == ARRAY_SIZE2(radii), ""); + static const uint8_t (&radiusProxy)[NUM_PIXELS] = radii; + static const uint8_t RADII_SCALE_DIVISOR { 1 }; // radii[] values are already in range [0..255] + static const uint8_t RADII_SCALE_MULTIPLIER { 1 }; // radii[] values are already in range [0..255] #elif defined(PRODUCT_1628_RINGS) // Yes, this is 1628 pixels ... all driven by one ESP8266 // 20 concentric rings of pixel goodness! diff --git a/esp8266-fastled-webserver/config.h b/esp8266-fastled-webserver/config.h index 6278fef1..ccb207e7 100644 --- a/esp8266-fastled-webserver/config.h +++ b/esp8266-fastled-webserver/config.h @@ -35,6 +35,7 @@ // #define PRODUCT_FIBONACCI64_NANO // 33mm, SK6805-EC15, ~5mA/pixel // #define PRODUCT_FIBONACCI32 // #define PRODUCT_KRAKEN64 + // #define PRODUCT_CHAMAELEON64 // #define PRODUCT_ESP8266_THING // aka parallel (6-output) // #define PRODUCT_1628_RINGS #endif /// !defined(BUILDING_USING_PLATFORMIO) @@ -59,6 +60,8 @@ #include "./include/configs/product/1628rings.h" #elif defined(PRODUCT_KRAKEN64) #include "./include/configs/product/kraken64.h" + #elif defined(PRODUCT_CHAMAELEON64) + #include "./include/configs/product/chamaeleon64.h" #elif defined(PRODUCT_FIBONACCI32) #include "./include/configs/product/fibonacci32.h" #elif defined(PRODUCT_FIBONACCI64_FULL) || defined(PRODUCT_FIBONACCI64_MINI) || defined(PRODUCT_FIBONACCI64_MICRO) || defined(PRODUCT_FIBONACCI64_NANO) diff --git a/esp8266-fastled-webserver/include/configs/product/chamaeleon64.h b/esp8266-fastled-webserver/include/configs/product/chamaeleon64.h new file mode 100644 index 00000000..d45beeaa --- /dev/null +++ b/esp8266-fastled-webserver/include/configs/product/chamaeleon64.h @@ -0,0 +1,70 @@ +/* + ESP8266 FastLED WebServer: https://github.com/jasoncoon/esp8266-fastled-webserver + Copyright (C) Jason Coon + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#pragma once + +#if !defined(ESP8266_FASTLED_WEBSERVER_PRODUCT_CHAMAELEON64_H) +#define ESP8266_FASTLED_WEBSERVER_PRODUCT_CHAMAELEON64_H + +#if !defined(LED_TYPE) + #define LED_TYPE WS2812B +#endif +#if !defined(COLOR_ORDER) + #define COLOR_ORDER GRB +#endif +#if !defined(NUM_PIXELS) + #define NUM_PIXELS 64 +#endif +#if !defined(AVAILABLE_MILLI_AMPS) + #define AVAILABLE_MILLI_AMPS 1400 // IMPORTANT: set the max milli-Amps of your power supply (4A = 4000mA) +#endif +#if !defined(MAX_MILLI_AMPS_PER_PIXEL) + #define MAX_MILLI_AMPS_PER_PIXEL 60 // IMPORTANT: set to larger value if necessary +#endif +#if !defined(FRAMES_PER_SECOND) + #define FRAMES_PER_SECOND 120 +#endif +#if !defined(DEFAULT_PATTERN_INDEX) + #define DEFAULT_PATTERN_INDEX 0 +#endif +#if !defined(DEFAULT_BRIGHTNESS_INDEX) + #define DEFAULT_BRIGHTNESS_INDEX 3 +#endif +#if !defined(DEFAULT_COLOR_CORRECTION) + #define DEFAULT_COLOR_CORRECTION TypicalSMD5050 +#endif +#if !defined(NAME_PREFIX) + #define NAME_PREFIX "Chamaeleon64-" +#endif +#if !defined(PRODUCT_FRIENDLY_NAME) + #define PRODUCT_FRIENDLY_NAME "Chamaeleon64" +#endif +#if !defined(IS_FIBONACCI) + #define IS_FIBONACCI 0 +#endif +#if !defined(HAS_COORDINATE_MAP) + #define HAS_COORDINATE_MAP 1 +#endif +#if !defined(HAS_POLAR_COORDS) + #define HAS_POLAR_COORDS 0 +#endif +#if !defined(PARALLEL_OUTPUT_CHANNELS) + #define PARALLEL_OUTPUT_CHANNELS 1 +#endif + + +#endif // ESP8266_FASTLED_WEBSERVER_PRODUCT_CHAMAELEON64_H diff --git a/platformio.ini b/platformio.ini index 09d9d966..962ce5ef 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,7 +17,7 @@ [platformio] extra_configs = platformio_override.ini ; so users can easily override settings -default_envs = fastled_webserver__d1_mini, fib512__d1_mini, fib256__d1_mini, fib128__d1_mini, fib64_full__d1_mini, fib64_mini__d1_mini, fib32__d1_mini, esp_thing__d1_mini, kraken64__d1_mini, esp_thing__d1_mini, 1628_rings__d1_mini +default_envs = fastled_webserver__d1_mini, fib512__d1_mini, fib256__d1_mini, fib128__d1_mini, fib64_full__d1_mini, fib64_mini__d1_mini, fib32__d1_mini, esp_thing__d1_mini, kraken64__d1_mini, chamaeleon64__d1_mini, esp_thing__d1_mini, 1628_rings__d1_mini ; default_envs = fastled_webserver ; default_envs = fib512__d1_mini ; default_envs = fib256__d1_mini @@ -29,6 +29,7 @@ default_envs = fastled_webserver__d1_mini, fib512__d1_mini, fib256__d1_mini, fib ; default_envs = fib32__d1_mini ; default_envs = esp_thing__d1_mini ; default_envs = kraken64__d1_mini +; default_envs = chamaeleon64__d1_mini ; default_envs = esp_thing__d1_mini ; default_envs = 1628_rings__d1_mini @@ -224,6 +225,12 @@ build_flags = ${common.build_flags_esp8266} -D PRODUCT_KRAKEN64 +[env:chamaeleon64__d1_mini] +extends = common__d1_mini +build_flags = + ${common.build_flags_esp8266} + -D PRODUCT_CHAMAELEON64 + [env:esp_thing__d1_mini] extends = common__d1_mini build_flags =