Release of WLED 0.8.1

Added Lake effect
This commit is contained in:
cschwinne 2018-11-07 20:22:05 +01:00
parent 6aaf544079
commit 48265bbe02
9 changed files with 40 additions and 13 deletions

View File

@ -1,11 +1,11 @@
![WLED logo](https://raw.githubusercontent.com/Aircoookie/WLED/development/wled_logo.png) ![WLED logo](https://raw.githubusercontent.com/Aircoookie/WLED/development/wled_logo.png)
## Welcome to my project WLED! (v0.8.1-dev) ## Welcome to my project WLED! (v0.8.1)
A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B) LEDs! A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B) LEDs!
### Features: ### Features:
- WS2812FX library integrated for over 70 special effects - WS2812FX library integrated for 75 special effects
- FastLED noise effects and palettes - FastLED noise effects and palettes
- Customizable Mobile and desktop UI with color and effect controls - Customizable Mobile and desktop UI with color and effect controls
- Settings page - configuration over network - Settings page - configuration over network

View File

@ -2,7 +2,7 @@
#ifndef NpbWrapper_h #ifndef NpbWrapper_h
#define NpbWrapper_h #define NpbWrapper_h
//#define WORKAROUND_ESP32_BITBANG #define WORKAROUND_ESP32_BITBANG
//see https://github.com/Aircoookie/WLED/issues/2 for flicker free ESP32 support //see https://github.com/Aircoookie/WLED/issues/2 for flicker free ESP32 support
#define LEDPIN 2 //strip pin. Any for ESP32, gpio2 is recommended for ESP8266 #define LEDPIN 2 //strip pin. Any for ESP32, gpio2 is recommended for ESP8266
@ -14,6 +14,7 @@
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32
#ifdef WORKAROUND_ESP32_BITBANG #ifdef WORKAROUND_ESP32_BITBANG
#define PIXELMETHOD NeoEsp32BitBangWs2813Method #define PIXELMETHOD NeoEsp32BitBangWs2813Method
#pragma message "Software BitBang is used because of your NeoPixelBus version. Look in NpbWrapper.h for instructions on how to mitigate flickering."
#else #else
#define PIXELMETHOD NeoEsp32RmtWS2813_V3Method #define PIXELMETHOD NeoEsp32RmtWS2813_V3Method
#endif #endif

View File

@ -2484,6 +2484,7 @@ uint16_t WS2812FX::mode_noise16_4(void)
} }
//based on https://gist.github.com/kriegsman/5408ecd397744ba0393e
uint16_t WS2812FX::mode_colortwinkle() uint16_t WS2812FX::mode_colortwinkle()
{ {
CRGB fastled_col, prev; CRGB fastled_col, prev;
@ -2517,7 +2518,7 @@ uint16_t WS2812FX::mode_colortwinkle()
{ {
int i = SEGMENT.start + random16(SEGMENT_LENGTH); int i = SEGMENT.start + random16(SEGMENT_LENGTH);
if(getPixelColor(i) == 0) { if(getPixelColor(i) == 0) {
fastled_col = ColorFromPalette( currentPalette, random8(), 64, NOBLEND); fastled_col = ColorFromPalette(currentPalette, random8(), 64, NOBLEND);
_locked[i] = true; _locked[i] = true;
setPixelColor(i, fastled_col.red, fastled_col.green, fastled_col.blue); setPixelColor(i, fastled_col.red, fastled_col.green, fastled_col.blue);
return 20; //only spawn 1 new pixel per frame return 20; //only spawn 1 new pixel per frame
@ -2526,3 +2527,22 @@ uint16_t WS2812FX::mode_colortwinkle()
} }
return 20; return 20;
} }
//Calm effect, like a lake at night
uint16_t WS2812FX::mode_lake() {
uint8_t sp = SEGMENT.speed/10;
int wave1 = beatsin8(sp +2, -64,64);
int wave2 = beatsin8(sp +1, -64,64);
uint8_t wave3 = beatsin8(sp +2, 0,80);
CRGB fastled_col;
for (uint16_t i = SEGMENT.start; i <= SEGMENT.stop; i++)
{
int index = cos8((i*15)+ wave1)/2 + cubicwave8((i*23)+ wave2)/2;
uint8_t lum = (index > wave3) ? index - wave3 : 0;
fastled_col = ColorFromPalette(currentPalette, map(index,0,255,0,240), lum, LINEARBLEND);
setPixelColor(i, fastled_col.red, fastled_col.green, fastled_col.blue);
}
return 33;
}

View File

@ -83,7 +83,7 @@
#define REVERSE (uint8_t)0x80 #define REVERSE (uint8_t)0x80
#define IS_REVERSE ((SEGMENT.options & REVERSE) == REVERSE) #define IS_REVERSE ((SEGMENT.options & REVERSE) == REVERSE)
#define MODE_COUNT 75 #define MODE_COUNT 76
#define FX_MODE_STATIC 0 #define FX_MODE_STATIC 0
#define FX_MODE_BLINK 1 #define FX_MODE_BLINK 1
@ -161,6 +161,7 @@
#define FX_MODE_NOISE16_3 72 #define FX_MODE_NOISE16_3 72
#define FX_MODE_NOISE16_4 73 #define FX_MODE_NOISE16_4 73
#define FX_MODE_COLORTWINKLE 74 #define FX_MODE_COLORTWINKLE 74
#define FX_MODE_LAKE 75
class WS2812FX { class WS2812FX {
typedef uint16_t (WS2812FX::*mode_ptr)(void); typedef uint16_t (WS2812FX::*mode_ptr)(void);
@ -264,6 +265,7 @@ class WS2812FX {
_mode[FX_MODE_NOISE16_3] = &WS2812FX::mode_noise16_3; _mode[FX_MODE_NOISE16_3] = &WS2812FX::mode_noise16_3;
_mode[FX_MODE_NOISE16_4] = &WS2812FX::mode_noise16_4; _mode[FX_MODE_NOISE16_4] = &WS2812FX::mode_noise16_4;
_mode[FX_MODE_COLORTWINKLE] = &WS2812FX::mode_colortwinkle; _mode[FX_MODE_COLORTWINKLE] = &WS2812FX::mode_colortwinkle;
_mode[FX_MODE_LAKE] = &WS2812FX::mode_lake;
_brightness = DEFAULT_BRIGHTNESS; _brightness = DEFAULT_BRIGHTNESS;
_running = false; _running = false;
@ -438,6 +440,7 @@ class WS2812FX {
mode_noise16_3(void), mode_noise16_3(void),
mode_noise16_4(void), mode_noise16_4(void),
mode_colortwinkle(void), mode_colortwinkle(void),
mode_lake(void),
mode_lightning(void); mode_lightning(void);
private: private:

View File

@ -192,10 +192,10 @@
function SwFX(s) function SwFX(s)
{ {
var n=Cf.TX.selectedIndex+s; var n=Cf.TX.selectedIndex+s;
if (n==-1||n==75) return; if (n==-1||n==76) return;
Cf.TX.selectedIndex =n; Cf.TX.selectedIndex =n;
if (n < 0) Cf.TX.selectedIndex = 0; if (n < 0) Cf.TX.selectedIndex = 0;
if (n > 74) Cf.TX.selectedIndex = 65; if (n > 75) Cf.TX.selectedIndex = 65;
GX(); GX();
} }
function TgHSB() function TgHSB()
@ -661,6 +661,7 @@
<option value="72">Noise 16 3 (72)</option> <option value="72">Noise 16 3 (72)</option>
<option value="73">Noise 16 4 (73)</option> <option value="73">Noise 16 4 (73)</option>
<option value="74">Colortwinkle (74)</option> <option value="74">Colortwinkle (74)</option>
<option value="75">Lake (75)</option>
</select><br><br> </select><br><br>
Set secondary color to Set secondary color to
<button type="button" onclick="CS(0)">White</button> <button type="button" onclick="CS(0)">White</button>

View File

@ -433,7 +433,8 @@
<li onclick="X(71)">Noise 16 2</li> <li onclick="X(71)">Noise 16 2</li>
<li onclick="X(72)">Noise 16 3</li> <li onclick="X(72)">Noise 16 3</li>
<li onclick="X(73)">Noise 16 4</li> <li onclick="X(73)">Noise 16 4</li>
<li onclick="X(74)">Colortwinkle</li>&nbsp; <li onclick="X(74)">Colortwinkle</li>
<li onclick="X(75)">Colortwinkle</li>&nbsp;
<li><a href="#">Go to top</a></li>&nbsp; <li><a href="#">Go to top</a></li>&nbsp;
<p style="margin-left:-37px">FastLED Palette (Effects 56-73)</p> <p style="margin-left:-37px">FastLED Palette (Effects 56-73)</p>
<li onclick="P(0)">Default</li> <li onclick="P(0)">Default</li>

File diff suppressed because one or more lines are too long

View File

@ -63,7 +63,7 @@
//version code in format yymmddb (b = daily build) //version code in format yymmddb (b = daily build)
#define VERSION 1811041 #define VERSION 1811071
char versionString[] = "0.8.1"; char versionString[] = "0.8.1";

View File

@ -260,7 +260,8 @@ void getBuildInfo()
oappendi(buttonPin); oappendi(buttonPin);
oappend("\r\nstrip-pin: gpio"); oappend("\r\nstrip-pin: gpio");
oappendi(LEDPIN); oappendi(LEDPIN);
oappend("\r\nbuild-type: dev\r\n"); oappend("\r\nbrand: wled\r\n");
oappend("\r\nbuild-type: src\r\n");
} }