From 61eb7b0a6a0314ad4c3ec588e2742aa0a5f4cd2a Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 29 Apr 2023 17:04:16 +0200 Subject: [PATCH] Waving Cell FX --- wled00/FX.cpp | 19 +++++++++++++++++++ wled00/FX.h | 1 + 2 files changed, 20 insertions(+) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index f3bbb957..0f04810e 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -7546,6 +7546,24 @@ uint16_t mode_2Doctopus() { static const char _data_FX_MODE_2DOCTOPUS[] PROGMEM = "Octopus@!,!,,,Legs;;!;2;ix=255"; +//Waving Cell +//@Stepko (https://editor.soulmatelights.com/gallery/1704-wavingcells) +// adapted for WLED by @blazoncek +uint16_t mode_2Dwavingcell() { + if (!strip.isMatrix) return mode_static(); // not a 2D set-up + + const uint16_t cols = SEGMENT.virtualWidth(); + const uint16_t rows = SEGMENT.virtualHeight(); + + uint32_t t = millis()/(256-SEGMENT.speed); + for (int x = 0; x < cols; x++) for (int y = 0; y