plummerssoftwarellc / nightdriverstrip Goto Github PK
View Code? Open in Web Editor NEWNightDriver client for ESP32
Home Page: https://plummerssoftwarellc.github.io/NightDriverStrip/
License: GNU General Public License v3.0
NightDriver client for ESP32
Home Page: https://plummerssoftwarellc.github.io/NightDriverStrip/
License: GNU General Public License v3.0
Problem
After flashing my board, the splash logo does not time out in a few seconds. If I erase_flash and then reprogram, it fixes it. But it recurs.
Steps
I wonder if perhaps the full interval is being stored for it? There's some special logic that allows an effect to set a max duration, and perhaps that's being ignored?
If there's a way for me to fetch the JSON from SPIFFs, let me know. If not, consider adding a "/dumpjson" REST call to do just that in order to ease future debugging?
Problem
When creating a new custom effect, after adding the strip effect number in effects.h
, the new effect's JSON constructor should also be added at the g_JsonEffectFactories
map in file effectfactories.cpp
so that the effect persists across reboots. If the effect's JSON contructor is not added in the map, when restarting the board the new effect is not present in the /effects.cfg
.
Notes
I think that this should be noted in README.md so the steps on how to add a new custom effect are clearer.
Originally posted by rbergen November 14, 2021
Hi everyone,
A few minutes ago, the NightDriverUnity repository was published. As Dave puts it, NightDriverUnity is a set of scripts for Unity that together constitute a "demo" of how to create a server application to drive NightDriverStrip instances remotely by WiFi.
Please explore and extend the contents of this new repository!
Cheers,
Rutger
As described in this comment on PR #330, it makes sense to move hardware initialization code for LED strip and matrix hardware from setup() in main.cpp to LEDStripGFX and LEDMatrixGFX, respectively.
Problem
The code contains OTA support that worked when the project was small enough to fit in the default partition table. When the code grew, partitions_custom.csv was added to accommodate it. Unfortunately doing so seems to have broken OTA support.
Steps
It would be nice to have an effect that cycled through the major game scores in a particular sport, like NFL/NBA/etc. Should be cool and sexy and even animated if you're adventurous. As with weather, you'd need to provide a setting for the API key as well as which sport to report on.
Bonus points for team logos :-)
The chip we're using on the Mesmerizer has 8GB of PSRAM and 8GB of flash (or more, depending on which chip you have). But our partition table only works for 4GB. I've tried to create an 8GB version but can't set it to boot, so need someone to take a look!
Two main goals:
szChannelID and szChannelName1 should be user-settable properties, but they're hard coded string constants, so you'd have to recompile it to target it to a different channel. They should be handled like zip code. We probably need a way to set the API key for weather, too...
Problem
I can't make a Mr. Beast counter without recompiling.
Problem
The demo for the NightDriverStrip doesn't appear to work for the M5StickCPlus. The M5StickCPlus, when properly programmed, should have the demo LED sequence played.
The selected LED Pin doesn't have a signal as checked by the oscilloscope.
Steps
globals.h
with the appropriate PIN Output (See example attached).platform.ini
with the example settings (See example attached).pio run -t upload
globals.h
, 3.3 volt supply is provided and g0 is pulled high.Example
Notes
Recently, the ability was added for effects to expose settings that can be changed via the API. A few basic settings have been exposed by LEDStripEffect
; the PatternSubscribers
effect adds two more for itself.
Obviously, there are more effects for which it makes sense to expose properties as settings that can be changed via the device API and (later) the device web UI.
When working on this:
REST_API.md
file contains information about the effect settings API endpoints.PatternSubscribers
effect provides an example of an effect extending the basic settings exposed by LEDStripEffect
.LEDStripEffect
includes a number of helper functions for changing effect settings of "known types". Known types are themselves defined by the SettingSpec
struct in types.h
.Re: FFT looks wrong somehow from youtube....
When I did my audio projects many years back I used a couple of FFT routines that I modified a bit. See "player_fft.c" and "player_integer_fft.c" from "src_v0.61.tar.gz" here:
https://sourceforge.net/projects/centroplayer/files/
Results are here:
https://www.youtube.com/watch?v=zHSGtInrsDY&t=62s
Not a fair comparison with the ESP32 though as this was CD quality audio on a fast ARM CPU. Still might be worth a quick look at in case it is better the aurdino ide default fft.
Problem
When creating a new effect the SerializeToJSON( ) virtual function should also be implemented. If not when reseting the esp32, either via the reset button or powering off and on, the new effect still shows up at the effects list and the web server but nothing is drawn on the Leds which remain turned off (black).
Steps
Problem
I have an Espressif ESP 32 WROOM-32 that was running WLED with no troubles. I wanted to install NightDriverStrip instead. However, the webinstaller is failing (and I don't have my setup right to install from source code yet).
The webinstaller:
I'm using the SiliconLabs CP201x USB to UART Bridge on COM4 on a Win10 Lenovo Laptop, connected directly to a USB port, using the same data cable that I am using to successfully install WLED.
Port Settings are:
Any thoughts or ideas? Much appreciated. I'm looking forward to using this, and learning to contribute.
Steps
Example
Notes
I did have the esp32 seated in a bridge and it was connected to the lights when I did the flash at first. Subsequent attempts were done with the esp32 disconnected.
I have also successfully flashed WLED back to it.
Also, I did a hard reset of the esp32 with esptools and tried again without success.
Problem
Steps
Example
Notes
Problem
Steps
Example
curl -d 'effectIndex=0' 192.168.0.25/disableEffect
When the API request fails, it blocks the main draw thread for about a second, pausing drawing
Not sure if this a priority issue or if there just isn't CPU time for everything that needs to happen, but at a minimum we should "grow" the delay between attempts so that its not several times per minute if it's failing.
NightDriverStrip builds, including those in CI, started failing today. This is due to a change in version 1.9.7 of Adafruit BusIO that gets pulled into the dependency tree; it was version 1.9.6 in the last CI builds that succeeded.
The upstream issue (adafruit/Adafruit_BusIO#69) points to not having the latest ESP32 Arduino framework, while Platform IO states everything is already up to date. An issue for this has also been opened on the PlatformIO espressif32 repo: platformio/platform-espressif32#680.
Looking at the state of affairs, I think the best choice is to sit this one out, for now.
There are a number of interesting matrix effects to be found here:
https://github.com/StefanPetrick/animartrix/blob/main/animation_collection.ino
I think we should port some of the best ones to NightDriver. They would need to be wrapped in LEDStripEffect, and the oscillators likely need to go in GFXBase.
Problem
The Mesmerizer board stops responding to incoming requests (like to the webserver), and is also unable to make any outbound connections henceforth (as shown by the logging). Logging shows WiFi connectivity to still be active, although the board does not respond to any incoming network requests any more. A reboot is required to restore functional networking.
Steps
Notes
This is a log snippet that captured an exact moment the networking stopped working:
(W) (Draw)(C1) Spawning thread to check weather..
(I) (getWeatherData)(C0) Got today's temps: Now 14 Lo 12, Hi 15, Icon 1
(W) (UpdateWeather)(C0) Got today's weather
WiFi: WL_CONNECTED, IP: 192.168.1.155, Mem: 34836, LargestBlk: 30708, PSRAM Free: 1028947/4175963, LED FPS: 23 Refresh: 63 Hz, Audio FPS: 62, MinVU: 350.4, PeakVU: 361.8, VURatio: 0.0 Buffer: 0/500, CPU: 051%, 069%, FreeDraw: 0.016
(W) (getTomorrowTemps)(C0) Error fetching forecast data for location: Vianen in country: nl
(W) (UpdateWeather)(C0) Weather thread exiting
The first outgoing HTTP request succeeded, the second failed. From this point onwards, inbound and outgoing networking was broken.
I have tried to also reproduce the issue on an M5StickC Plus with the Spectrum project, but was unable to do so.
I think the diagnostics point to leaving the tracks here, but the cause may be higher:
(I) (ConnectToWiFi)(C0) Starting/restarting Socket Server...
(W) (ProcessIncomingConnectionsLoop)(C1) Error accepting data!
I) (ConnectToWiFi)(C0) Socket server started.
Problem
Inbound network connection attempts on ports 443 and 80 fail, even i you just do a 'telnet whatever 80". Once things are out of sync, even the telnet connection dies.
telnet 192.168.2.165 23 # works
telnet to ports 80 and 443 fail:
➜ nightdriverstrip git:(msg_cleanup) ✗ telnet 192.168.2.165 80
Trying 192.168.2.165...
telnet: connect to address 192.168.2.165: Connection refused
telnet: Unable to connect to remote host
➜ nightdriverstrip git:(msg_cleanup) ✗ telnet 192.168.2.165 443
Trying 192.168.2.165...
telnet: connect to address 192.168.2.165: Connection refused
telnet: Unable to connect to remote host
Steps
Example
Notes
The socket code seems very textbook. I don't know if it's something special about my environment (maybe reverse DNS looks don't work, for example), if this is broken for a large group of people, or my expectations are off.
Commented system logs, coming fresh out of a reboot:
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
E (1157) esp_core_dump_flash: No core dump partition found!
E (1157) esp_core_dump_flas���r��ɕ�"յ�����ѥѥ���2�չ��jR�Replacing Idle Tasks with TaskManager...
(I) (PrintOutputHeader)(C1) NightDriverStrip
That seems unfortunate, but I don't think is related.
(I) (PrintOutputHeader)(C1) M5STICKC: 0, USE_M5DISPLAY: 0, USE_OLED: 0, USE_TFTSPI: 0, USE_LCD: 0, USE_AUDIO: 1, ENABLE_REMOTE: 1
(I) (PrintOutputHeader)(C1) ESP32 PSRAM Init: OK
Default configs, I think.
(I) (PrintOutputHeader)(C1) Version 36: Wifi SSID: "ElderOfTheInternet" - ESP32 Free Memory: 257948, PSRAM:4192043, PSRAM Free: 4178867
(I) (PrintOutputHeader)(C1) ESP32 Clock Freq : 240 MHz
(I) (setup)(C1) Startup!
(I) (setup)(C1) Starting DebugLoopTaskEntry
This is a little misleading. This isn't the SSID we've found, it's the SSID we want. But carrying on.
(W) (DeviceConfig)(C1) DeviceConfig could not be loaded from JSON, using defaults
DeviceConfig is demand created, right? It's interesting that one from a previous run didn't persist.
(I) (ConnectToWiFi)(C0) Setting host name to NightDriverStrip...WL_NO_SHIELD
That can't be good, but it's not clear what error 255 is or really, where it came from. (Man, I'm going to have to tackle JTAG debugging on this thing...)
(W) (ConnectToWiFi)(C0) Pass 1 of 5: Connecting to Wifi SSID: "ElderOfTheInternet" - ESP32 Free Memory: 110008, PSRAM:4175803, PSRAM Free: 1013543
So on the first iteration, we see our AP (that's mine) and I've confirmed that it's authenticated correctly. We have a bunch of memory for now.
(W) (LoadJSONFile)(C1) Out of memory reading JSON from file /effects.cfg - increasing buffer to 6909 bytes
It's hard to tell, but I think it's just bragging that this was an initial allocation to demand fill a buffer. "Good job"
(W) (ColorDataTaskEntry)(C1) Started color data server!
(W) (ConnectToWiFi)(C0) Connected to AP with BSSID: 74:AC:B9:4E:6A:40
(W)
(W) (ConnectToWiFi)(C0) Received IP: 192.168.ZZ.ZZ
Yay. But next it turns ugly:
(I) (ConnectToWiFi)(C0) SetionsLoop)(C1) ErrorW) (ProcessIncomingConnectionsLoop)(C1) Error accepting data!
(W) (SocketServerTaskEntry)(C1) Socket connection closed. Retrying...
[ 6232][E][WiFiUdp.cpp:221] parsePacket(): could not receive data: 9
(W)
(W) (StartEffectThread)(C1) >> Launching Subs Effect Thread
(W) (StartEffectThread)(C1) >> Launching Weather Effect Thread
(W) (NotifyJSONWriterThread)(C1) >> Notifying JSON Writer Thread
(I) (ConnectToWiFi)(C0) Starting Web Server...
(I) (begin)(C0) Connecting Web Endpoints
(I) (begin)(C0) Embedded html file size: 1350
(I) (begin)(C0) Embedded jsx file size: 39948
(I) (begin)(C0) Embedded ico file size: 15406
(I) (begin)(C0) Embedded timezones file size: 17834
[ 6984][E][AsyncTCP.cpp:1251] begin(): failed to start task
(I) (begin)(C0) HTTP server started
(I) (ConnectToWiFi)(C0) Web Server begin called!
Now things are just failing to taunt us. The servers seem to have started, but if we connect directly, the accepts all just fall apart.
Is this stuff working for anyone? Am I misunderstanding the expectation that I should be able to open a browser (maybe even https - I can't tell if there's a cert smuggled in there) on http://NightDriverStrip and have reasonable access to pointy clickity things?
I'm willing to chase things up into the IDF/Arduino layers if I HAVE to, but first I'd like confirmation that my basic expectations are correct and that this is working for someone...
It would be nice to have an effect to show a stock price. Since we do/will soon support multiple copies of an effect with different parameters, I think the effect only needs to handle one stock at a time.
You'd need to sign up for a free-to-use stock ticker service and provide a way to set the API key, ala the Weather example.
We need a single page in the app for setting the global user settings, such as:
ZIP Code and City
Time Zone
Weather API Key
Stocks API Key (if needed)
YouTube subscriber count API key
Those last 3 could be per-effect settings, but that would make them a lot less discoverable, so I argue for promoting them up to global in the UI so people can find them.
Problem
The ESP32 repeatedly keeps on rebooting due to an unhandled exception (std::bad_alloc)
I don't know why exactly, but with the BROOKLYNROOM config, it happens the most.
The issue seems to be related to the Arduino OTA handler, see the stack trace below
src/main.cpp:674 relates to this line
Steps
Example
Notes
Stack trace:
`
(I) (TerminateHandler)(C1) -------------------------------------------------------------------------------------
(I) (TerminateHandler)(C1) - NightDriverStrip Guru Meditation Unhandled Exception -
(I) (TerminateHandler)(C1) -------------------------------------------------------------------------------------
(I) (PrintOutputHeader)(C1) NightDriverStrip
(I)
(I) (PrintOutputHeader)(C1) -------------------------------------------------------------------------------------
(I) (PrintOutputHeader)(C1) M5STICKC: 0, USE_OLED: 1, USE_TFT: 0
(I) (PrintOutputHeader)(C1) Version 137: Wifi SSID: NETGEAR90 - ESP32 Free Memory: 68692, PSRAM:0, PSRAM Free: 0
(I) (PrintOutputHeader)(C1) ESP32 Clock Freq : 240 MHz
(I) (TerminateHandler)(C1) Terminated due to exception: std::bad_alloc
ELF file SHA256: 0000000000000000
Backtrace: 0x4008c84c:0x3ffb1e20 0x4008cac9:0x3ffb1e40 0x400dd3c9:0x3ffb1e60 0x4017f3f7:0x3ffb1e90 0x4017f45e:0x3ffb1eb0 0x4017e89b:0x3ffb1ed0 0x4017ee4e:0x3ffb1ef0 0x4017ea05:0x3ffb1f10 0x400e58dd:0x3ffb1f30 0x4010144e:0x3ffb1f70 0x400dd455:0x3ffb1f90 0x40104254:0x3ffb1fb0 0x4008db1a:0x3ffb1fd0
#0 0x4008c84c:0x3ffb1e20 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#1 0x4008cac9:0x3ffb1e40 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#2 0x400dd3c9:0x3ffb1e60 in TerminateHandler() at src/main.cpp:404
#3 0x4017f3f7:0x3ffb1e90 in __cxxabiv1::__terminate(void ()()) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
#4 0x4017f45e:0x3ffb1eb0 in std::terminate() at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
#5 0x4017e89b:0x3ffb1ed0 in __cxa_throw at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_throw.cc:87
#6 0x4017ee4e:0x3ffb1ef0 in operator new(unsigned int) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_op.cc:54
#7 0x4017ea05:0x3ffb1f10 in operator new[](unsigned int) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_opv.cc:32
#8 0x400e58dd:0x3ffb1f30 in WiFiUDP::parsePacket() at C:\Users\John Doe.platformio\packages\framework-arduinoespressif32\cores\esp32/Udp.h:46
#9 0x4010144e:0x3ffb1f70 in ArduinoOTAClass::handle() at C:\Users\John Doe.platformio\packages\framework-arduinoespressif32\libraries\ArduinoOTA\src/ArduinoOTA.cpp:100
#10 0x400dd455:0x3ffb1f90 in loop() at src/main.cpp:674
#11 0x40104254:0x3ffb1fb0 in loopTask(void) at C:\Users\John Doe.platformio\packages\framework-arduinoespressif32\cores\esp32/main.cpp:23
#12 0x4008db1a:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
`
These variables are in global scope:
extern float gScaler; // Instantaneous read of LED display vertical scaling
extern float gLogScale; // How exponential the peaks are made to be
extern volatile float gVURatio; // Current VU as a ratio to its recent min and max
extern volatile float gVURatioFade;
extern volatile float gVU; // Instantaneous read of VU value
extern volatile float gPeakVU; // How high our peak VU scale is in live mode
extern volatile float gMinVU; // How low our peak VU scale is in live mode
extern volatile unsigned long g_cSamples; // Total number of samples successfully collected
extern int g_AudioFPS; // Framerate of the audio sampler
extern unsigned long g_lastPeak1Time[NUM_BANDS];
extern float g_peak1Decay[NUM_BANDS];
extern float g_peak2Decay[NUM_BANDS];
extern float g_peak1DecayRate;
extern float g_peak2DecayRate;
They should be moved to an AudioStats class, made into a singleton, and then perhaps references by the AudioAnalyzer as a member rather than a big old set of globals.
Global variables are bad
Look in globals.h
Example
Feel free to repeat in other areas until we've NICELY cleaned up all globals in a readable way.
Notes
Often times I get today's weather but tomorrow's stays all zeros. They're separate, but not sure why one would succeed and the other would fail!
When it happens, I get the local town, temp, and today's conditions icon and the high and low for today. For tomorrow, just zeros.
Where: USA color scheme of the SpectrumAnalyzerEffect
Sounds silly, but the red stripes are pinkish. You can verify this by comparing to the red VU pixels in the VU meter, which are a deep rich red.
I'm guessing there's some palette blending going on in the color lookup of the caller to DrawBar, but that's a guess.
I can really only see this easily on a WS2812B matrix - less so on the HUB75
If a chip module like the M5StickCPlus includes an SPI RAM package (PSRAM), we should allocate the video buffers preferentially out of that memory instead (except where DMA might be needed in the future, since you likely cannot DMA out of PSRAM).
Steps
Notes
SPIRAM can be treated as plentiful but slow. As noted, random-access-intensive operations like decrypting a buffer should likely be done in temp space.
When I launch a browser and go to the mesmerizer IP, I get the admin control panel but I don't really see anything until I click on the home button. It should default to showing the effect list.
We need a sports score effect. It should use an API that is free and for which the user can sign up for their own key, so that everyone is not using the same API key, unless it's unlimited (even bettter!).
Scores should cycle through the specified teams or games at some interval. It would be nice if it showed current and change, used color to indicate up vs down, and so on. Look at other stock tickers to see what functionality is included (but don't overtly copy anyone's design!).
If they're similar enough, it would be nice to specify league, such as NFL, NBA, FIFA, and have it adapt, but if they're significantly different (like baseball might show current runners on base, outs, etc) they could either be separate effects or inherit from a base sports effect, etc.
For most settings, like HueSpeed and ScrollSpeed and so on, sometimes only a range of reasonable values makes sense. I imagine the UI will eventually display a slider for such settings, and it also needs to know a min and max range.
So, I think properties like PTY_HUESPEED may need either system-wide ranges or, better yet, effect-defined ranges.
No idea how best to handle or implement this, just calling out that it's a likely need!
The pulsar effect is supposed to, and used to, display little blooming stars that get to be about 16 pixels wide. Right now they're enormous, extend outside the screen, and crash the system.
Basics: Fix Pulsar!
We need a stock ticker effect. It should use an API that is free and for which the user can sign up for their own key, so that everyone is not using the same API key, unless it's unlimited (even bettter!).
Ticker should cycle through the specified stocks at some interval. It would be nice if it showed current and change, used color to indicate up vs down, and so on. Look at other stock tickers to see what functionality is included (but don't overtly copy anyone's design!).
Dave suggested adding a new issue for this; see # 302 for the discussion
Problem
In the query for color information (ColorDataPacket), the caller will receive the led count, but must independetly know the width & height (which can be checked against the count).
Return the width and height in the query response, instead of the count (which can be computed as width * height).
use height == 1 for a linear layout
typedef struct
{
uint32_t header;
uint32_t width;
uint32_t height; // use 1 for linear strip
CRGB colors[NUM_LEDS]; // Array of LED_COUNT CRGB values, == width * height
} ColorDataPacket;
// width and height could be uint16_t instead if you prefer
You may then want to modify the Unity example accordingly.
Steps
Example
Notes
I've added support for pulling the state of the current display via a socket, and it would be nice to display the result in the UI on a preview page.
To fetch a packet, open a socket to port 12000. You can start reading packets out of the socket which have this form:
typedef struct
{
uint32_t header;
uint32_t count;
CRGB colors[NUM_LEDS]; // Array of LED_COUNT CRGB values
} ColorDataPacket;
The header will always be 0x434C5244
The count is the number of LEDs, and it should match the width*height
You would then draw a matrix in the HTML with dots representing each of the pixels in a 64x32 matrix populated with the colors. You can simply continue pulling packets as long as they are available, as one will be sent every new frame.
Problem
Steps
Example
Notes
Problem
The problem is the following line:
This initializes a new AsyncJsonResponse with 1024 bytes of JSON buffer. But if there are many effects, this buffer runs out and creates the following JSON:
{"currentEffect":0,"millisecondsRemaining":258835,"effectInterval":300000,"enabledCount":24,"Effects":[{"name":"RainbowFill Effect","enabled":true},{"name":"RainbowFill Effect","enabled":true},{"name":"Sample Effect","enabled":true},{"name":"Sample Effect","enabled":true},{"name":"Palette Effect","enabled":true},{"name":"DoublePaletteEffect Effect","enabled":true},{"name":"Meteor Effect","enabled":true},{"name":"Magenta Twinkle Stars","enabled":true},{"name":"Blue Sparkle Stars","enabled":true},{"name":"Red Twinkle Stars","enabled":true},{"name":"Lava Stars","enabled":true},{"name":"Rainbow Twinkle Stars","enabled":true},{"name":"Little Blooming Rainbow Stars","enabled":true},{"name":"Big Blooming Rainbow Stars","enabled":true},{"name":"Neon Bars","enabled":true},{"name":"VU Effect","enabled":true},{"name":"VU Effect","enabled":true},{"name":"VU Effect","enabled":true},{"name":"VU Effect","enabled":true},{}]}
Manually setting the buffer to e.g. 2048 bytes fixes the issue, although this is just a matter of time until this buffer size is gonna be too small again.
What are your thoughts on how to handle this? Is it worth the effort and calculating the buffer size beforehand, or would you just set the buffer size to a reasonable big size?
Steps
Example
The Brooklynroom config already comes with this issue
Notes
My temporary "fix" was to change this line
AsyncJsonResponse * response = new AsyncJsonResponse();
to
AsyncJsonResponse * response = new AsyncJsonResponse(false, 2048U);
Problem
I just uploaded Night Driver on to my ESP-WROOM32. the "calm fire" and" medium fire" are green and when I when i tried green twinkle it is red. I am using the WS2812b BTF-Lighting ones that Dave recommended. I believe it an RGB issue being backwards, however there is no place to change it that i can find in the webserver.
Steps
Example
Notes
We need a good set of open-source weather images from somewhere, or someone needs to draw a consistent set. Then remove and unused images from bmp/data
Problem
The Code is not compatible with latest heltec v3 wifi kit 32 it fails trying to upload filesystem Pops up an error this chip is ESP32-S3 Not ESP-32
Steps
Example
Notes
Hey there,
I tried to fix my web installer for my open source LED controlling software, after noticing that your web installer also works on the eps32 s3 (which I didn't manage to do earlier). Now I updated my web installer with some learnings of your web installer and the flashing works, sort of. But now the USB serial outputs only:
invalid header: 0xffffffff
in an infinite loop.
Any idea how to address this?
manifest.json:
{
"name": "Project",
"version": "0.15.1",
"home_assistant_domain": "leds",
"builds": [
{
"chipFamily": "ESP32-S3",
"parts": [
{ "path": "../bootloader/esp32_s3_bootloader.bin", "offset": 4096 },
{ "path": "../firmware/project/partitions.bin", "offset": 32768 },
{ "path": "../firmware/project/firmware.bin", "offset": 65536 },
{ "path": "../firmware/project/spiffs.bin", "offset": 3342336 }
]
}
]
}
Working platformio config:
[env:project]
board = esp32-s3-devkitc-1
platform = [email protected]
platform_packages =
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags}
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
; -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = tools/WLED_ESP32_8MB.csv
board_build.f_flash = 80000000L
board_build.flash_mode = qio
and the partitions.csv:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0x3F0000,
At some polnt the "Brightness Down" button, second from the left in the top row of the remote, next to ON) used to dim the brightness. If you hit ON, it would set to max brightness and pin the effect on.
I think the top two buttons should be Brite- and Brite+ and I prefer that Brite+ just goes to max brightness, not steps up. But we need to move the "SET_EFFECT_INTERVAL to MAX" feature to another button, one of the spare buttons in the lower right.
Wow, it looks amazing, how can I build a blink(1) like device with this project?
The ledstrip_feather config, which uses the TFT S3 Feather, reboots after about 10 seconds. Because it doesn't finish output, I have no logging of what's going on....
The Screen code has grown from 2 types suported to "too many" different screens supported, and everything is done with #ifdef.
Ideally, the base Screen class would be inherited by new classes like M5Screen and TFTScreen and OLEDScreen that implement their methods, like SetTextColor, by talking to the appropriate display.
In other words, refactor the screen code to use encapsulation and inheritance rather than ifdefs...
Another consideration is to make it support the GFXBase drawing, ie: Screen inherits from GFXBase. That way we'd be able to add the screen as an output channel one day. But it's lower priority.
When stepping rapidly through the effects, the caption name isn't updated correctly and will often show the last effect, not the current one
Problem
Should show the current effect
Steps
Step through the effects reasonably rapidly with the remote, observe wrong title
Just tested flashing the NightDriverStrip firmware via https://plummerssoftwarellc.github.io/NightDriverStrip/
And while the flashing itself works, the firmware cannot be loaded. VScode shows as the serial output only invalid header: 0xffffffff
Problem
Brite: section of display goes over 100% if it has to reduce the brightness to keep within the designated power. I would think it would report the % reduced from originally designated brightness.
Steps
Example
If you have the power limit set to 5000mW but the power required for set brightness at 255 would be 10,000mW, power control would cut the brightness probably to around 127. Brite: would display 200%. It should instead display 50% in that the LED brightness was cut in half.
Notes
Problem seems to be how the % is calculated in screen.cpp:
255.0f * 100 / calculate_max_brightness_for_power_mW(g_Brightness, POWER_LIMIT_MW));
calculate_max_brightness_for_power_mW returns the cut back brightness level from 1-255. So, the calculation should be in the numerator, and the base amount in the denominator:
calculate_max_brightness_for_power_mW(g_Brightness, POWER_LIMIT_MW))*100/255.0f ;
This unless the intent of the Brite: value was to show the % overage in brightness setting to maintain power limits but I would think it more meaningful to show how much the brightness was automatically cut back rather than how much overage the set brightness is to what it was cut back.
Since the user might be intentionally setting a lower brightness than maximum to begin with, and is required for the calculation function, might also be good to make the change based on what the target brightness is as set by g_Brightness rather than a fixed value of 255:
calculate_max_brightness_for_power_mW(g_Brightness, POWER_LIMIT_MW))*100/g_Brightness;
Not sure if g_Brightness would need a qualifier to make it as a float for the division.
In the effect UI, we need the ability to reorder the effects by dragging and dropping them to their new position. As far as I'm aware Rutger has already added the underlying API for this, but check with him to make sure its checked into the code before relying on it being there!
Problem
When using environment TTGO, compilation of effects.cpp generates an error.
Line calling SpectrumAnalyzerEffect is missing int parameter specifying number of spectrum columns
Notes
I was able to fix the issue in my cloned copy but not familiar enough on how to update Git repository without clobbering any changes since my cloning.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.