-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 support & flickering #2
Comments
Thanks for the feedback :) Great that you like it! Edit: If you'd like to try it yourself in the meantime, I'd think you'd just need the ESP32 core and change the LED method in WS2812FX.h to something like "NeoEsp32BitBang800KbpsMethod". Also, the ESP8266WebServer library would need substitution by "ESP32WebServer" which I don't think is available yet. |
Glad to report that even though I don't yet have any ESP32 hardware I got it to compile with the latest ESP32 arduino core! It would mean a lot to me if you could give me feedback on how well the ESP32 version works for you! |
I've finally gotten around to trying it on an ESP32 (Wemos and DOIT). The code uploads, and the AP/Web interface works well, as with the ESP8266, however, my neopixels are glitchy/flickering. I tried a 60-pixel and 12-pixel ring with and without a 3.3V level converter, adequate power, and a few different pins. The first pixel works and even adjusts with the interface. Edit/Update: Playing with settings. The Theater Chase Effect seems to work, or, to be safe, uses all the lights to give a chase effect which I assume is correct. There is still flickering on pixels in between. I tried an example from the WS2918FX library that seemed to work as well. |
First off all, great that the web interface works! I've added a delay(1); before the LED show() update. Also, the method was changed from "Neo800KbpsMethod" to "NeoWs2813Method". These might help solve the flickering. If it doesn't, change line 6 of WS2812FX.h back. On a different note, my ESP32 will arrive on Saturday so I can then test the code, too! |
I've uploaded your new changes and am testing/dabbling in settings, etc. I apologize for not being Arduino-savvy, but I certainly don't mind blackbox testing. Its a load of fun and this project is great, but my feedback might not be worded the best. With that, currently I have kept your changes, aside from ledcount(line 91) and LEDCOUNT(line 53) both which have been set to 60. On startup, there is no flicker, but also no color, and RGB sliders won't bring any up. As before however, the chase effect seems to work pretty well, and this time I couldn't see noticeable flickering on the unlit pixels.
|
Hi again, it makes me very happy that you like tinkering with the project so much and found a workaround!
I will make sure to try and reproduce your findings as soon as I get my hands on an ESP32 (hopefully tomorrow). In the meantime, you could try to paste http://10.10.1.11/win&A=100&FX=0&&R=0&G=255&B=255 in your address bar (replace 10.10.1.11 with the IP of your ESP). It should put the pixels to a medium brightness light blue. Thank you once again for taking the time to help me with the application! |
Good news! Today I finally got around connecting my ESP32 to some LEDs and was perfectly able to reproduce what you found out. |
Awesome!!! I will play around with it as soon as I can. Hopefully I can find a way to incorporate bluetooth, though I believe there's limitation on running BLE and Wifi simultaneously. |
Bluetooth would be really cool! What would you plan to do with it? The only reason I'd think it would be useful is with a mobile app because then you would not have to enter the IP address in the browser, or in fact, don't even need the ESP connected to your network or opening an AP. However, it would be quite a complex task since all the bluetooth networking and a new UI would need to be implemented from scratch. I've slightly changed the code again. Now the flickering is virtually not present anymore. It is still not an ideal approach, but I'm satisfied with it for now. The issue with my previous workaround was that it only worked with up to 33 pixels. 34 and beyond would flicker. By disabling interrupts, this should now be fixed. If you are interested, the issue is described here: adafruit/Adafruit_NeoPixel#139 . At the moment, there is nothing more I could do to improve the flickering (except switching the library, which would remove support for RGBW or any strip type besides WS2812B), but like I said its definiately useable now! By the way, the reboots I've observed previously are not a software issue. My power cable was broken, so I only had 4V voltage, which lead to those instabilities. |
I've finally found a solution for Hardware RMT ESP32 support. This means no flickering on ESP32 anymore (as of v0.6.0)! However, you'll need to use this fork of NeoPixelBus: https://github.com/svenihoney/NeoPixelBus/tree/b0485e09b374b368d5445d319b12501886da9788 since the changes aren't implemented in the master library (yet). Once you have that library installed and the original NeoPixelBus removed from your libraries, you can comment out the |
Is that fork of NeoPixelBus still relevant? |
@tonyn0 no, Rmt support (even all 8 channels!) was added to NeoPixelBus master about a year ago, so that fork is obsolete now :) |
* set.cpp: reject non-ADC pins as analog button pins (bugfix) * pinmanager: record conflicts added getOwnerText(PinOwner tag) and getPinConflicts(int gpio) GPIO | Assigned to | Info --------|-----------------------|------------ i/o 0 Button !! Conflict with AudioReactive (UM) !! (default) I2S MCLK i/o 1 debug output Serial TX i/o 2 ./. (default) LED pin i/o 3 ./. Serial RX i/o 5 ./. (default) SPI SS i/o 13 Button !! Conflict with IR Receiver !! PIN ALLOC error: GPIO19 for analog button wled#2 is not an analog pin!
this is a band-aid fix for random crashes when switching between presets with multiple segments - crossfade disabled. !! adding type initializers fixed it for me on -S3, however I still see (less frequent) crashes on esp32, due to heap corruption. It took me hours to get a meaningful stackdump: assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas") Backtrace: 0x40084ee1:0x3ffb2570 0x4008e341:0x3ffb2590 0x40094709:0x3ffb25b0 0x4008534a:0x3ffb26e0 0x40094739:0x3ffb2700 0x400e9037:0x3ffb2720 0x400e917c:0x3ffb2740 0x400eaeeb:0x3ffb2760 0x40117ec5:0x3ffb27c0 0x401184ea:0x3ffb2800 0x4013509d:0x3ffb2820 #0 0x40084ee1:0x3ffb2570 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402 #1 0x4008e341:0x3ffb2590 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128 #2 0x40094709:0x3ffb25b0 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85 #3 0x4008534a:0x3ffb26e0 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:360 (inlined by) heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:345 #4 0x40094739:0x3ffb2700 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39 #5 0x400e9037:0x3ffb2720 in Segment::deallocateData() at wled00/FX_fcn.cpp:189 #6 0x400e917c:0x3ffb2740 in Segment::resetIfRequired() at wled00/FX_fcn.cpp:206 (inlined by) Segment::resetIfRequired() at wled00/FX_fcn.cpp:203 #7 0x400eaeeb:0x3ffb2760 in WS2812FX::service() at wled00/FX_fcn.cpp:1216 (discriminator 2) #8 0x40117ec5:0x3ffb27c0 in WLED::loop() at wled00/wled.cpp:115 (discriminator 3) #9 0x401184ea:0x3ffb2800 in loop() at C:/src/wled00/wled00.ino:20 #10 0x4013509d:0x3ffb2820 in loopTask(void*) at C:/Users/user/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50 ELF file SHA256: 18c20b536f4c6ef4
…rt Adafruit MAX17048 module. (#2) Co-authored-by: Azots <78281612+Azots@users.noreply.github.com>
Would you happen to know how to port your project to ESP32? All my kids want me to make them a night light/party light for their rooms, and I'm running out of esp8266s, but have several esp32s I could use. Its an awesome application!
The text was updated successfully, but these errors were encountered: