Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
usane1
@usane1
Happiness was premature. It doesn't work with wifi and http control.
usane1
@usane1
Correcting myself again. There was some pin interference. It works an other pin.
Michael Miller
@Makuna
There is a bug with Esp32 i2s right now, that it randomly doesn't send the data it was requested to send. This has been raised in the esp32 project.
The default was switched from i2s to RMT. Just use the RMT methods, you have eight channels and the pins are selectable. And yes there are pins that are used for other things so you will need to double check your pins.
Thomas Huster
@tehuster
Hi, i'm trying to combine the NeoPixelBus library with the espressif ethernet library. When i', not combining, both work great but as soon as a run ETH.begin() the ledstrip becomes unresponsive. I have no compile or run errors and verbose logging is at lvl 5. Anyone got a clue, it would be greatly appreciated. Thanks for your time.
Michael Miller
@Makuna
@tehuster What platform? Esp8266, Esp32? What "method" are you using when defining the bus? What physical pin are you using?
Michael Miller
@Makuna
@tehuster I just noticed on Esp32 that you asked about the same issue with FastLed. The default "method" I was asking about on Esp32 does use RMT hardware feature. Since this is happening both with FastLed and NeoPixelBus, I suspect it might be the way you are using the libraries. Do you have a sketch that can demonstrate the problem that is as small as you can make but still shows the problem? Once you get this I can take a look.
Richard
@CircuitBaker
Hi @Makuna, I've been playing around with the library trying to get the examples to work on a Teensy 3.2, some parts works fine, but having troubles with getting any of the animations working, throwing up troubles with this "const AnimationParam& param" in Anim Update.

The animation code verifies with a more conventional type of arduino selected, but I've hit a brick wall of what to try, or whether the animation aspect of the library incompatible with teensy 3.x's (Maybe due to CPlusPlus lib).

In function `std::function<float (float)>::operator()(float) const':

/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/functional:2266: undefined reference to `std::__throw_bad_function_call()'

/arduino_build_106223/libraries/NeoPixelBus_by_Makuna/internal/NeoPixelAnimator.cpp.o: In function `std::function<void (AnimationParam const&)>::operator()(AnimationParam const&) const':

…/include/c++/5.4.1/functional:2266: undefined reference to `std::__throw_bad_function_call()'
Richard
@CircuitBaker
Thanks for the great library btw! Severely missing out on decent fades, excited to get it all working!
Michael Miller
@Makuna
@CircuitBaker What is your line of code where you supply the animation callback (your call to StartAnimation)?
Note that the more advanced platforms, the anim callback is defined using the "functional" STL feature. This allows for lambda expressions and other advanced techniques. But STL is not available for AVR platforms.
Check your STL support, it sounds like you have an incomplete version.
Michael Miller
@Makuna
@CircuitBaker We could try disable the STL requirement (small code change) for Teensy and see if it works. In your compile output, look for a compile line that has something -DARDUINO_ARCH in it, and copy that here. I can then give you a small change to see if it works.
Michael Miller
@Makuna
I just merged in some improvements for handling platforms that don't support STL correctly. If you are still hitting this issue with these changes, let me know the symbol (as requested above) from the compile line and I can add it to the list.
Richard
@CircuitBaker

@Makuna Thanks for all the tips, there was nothing wrong with your code, I went down a bit of a rabbit hole only to find it was a linker problem, I had to go to boards.txt and enable c++ by adding (teensy31.build.flags.libs=-lstdc++) and set to "smallest code" option in Arduino. All the animation code now compiles properly on Teensy 3.2.

Great library, thanks for all the work you've done! I've tried playing about with getting two animations working over the top of each other, and had bits of success, but I think I need to better understand animation channels. For instance if you were writing for an multiple animations to be triggered independently and blend over the top of each other, ie CylonAnim and FadeToAnim, would you set them to different animation channels, do these channels act like layers? (Like in photoshop) Or would you need a third container like BlendAnim to blend the states of the two animations when they occur? (Don't know if I'm explaining this correctly)

Michael Miller
@Makuna
This is a great question, and it is a complex subject with multiple ways to handle this based on how yours work.
First, do the animations run in lock step. What I mean is that is anim 1 is always started when anim 2 is started, and also they end together? If so, then I would merge them into one animation to simplify the solution.
If they aren't started at the same time, then this is a far more complex subject.
The animations channels have an implicit application order, channel 0 if active (its duration hasn't passed) is always run first. Then channel 1, and so on.
Within the animation, if you just call strip.SetPixelColor, then you will overwrite what ever is already present. It will not merge.
Michael Miller
@Makuna
If channel 0 animation always calls SetPixelColor, then channel 1 can "blend" by first calling GetPixelColor (to get the results of the first animation) and then "blend" its animation with those results. So channel 1 becomes unique in that it not only creates a results, but it also blends it in.
But this has a ramification, if the blend is not by a static amount (like 50% of each) but instead the blend is also animated, then this requires moving the blend out of channel 1. BUT how then you store the results of channel 1 animation because if you call SetPixelColor it will overwrite the result of channel 0.
Michael Miller
@Makuna
The answer is the NeoDib (Device Independent Bitmap). You instance one of these and use it to store the results of Channel 1. Then you have a third channel that calls NeoDib.Render(strip,...) passing it a shader (see examples) that does the blending.
Michael Miller
@Makuna
But this now means you need to have an extra buffer that is as large as your strip; which could be a lot of memory. How can you avoid this?
The answer is, not easily. But if this is your case, let me know.
Marc Went
@Dunky13

I have a questions regarding the NeoPixelBus and Async webservers. It's a long question so I'll try to K.I.S.S.
I took the NeoPixelBusFS (https://github.com/djcysmic/NeopixelBusFX) and rewote it from an ESPEasy pluging to a base ino file for my ESP8266. All works fine.
Set up a very basic input field to change the effect (rainbow, kitt, dualwipe etc) and works. But changing the html was a pain. Want to use SPIFFS and webeditor to change the HTML code that is served, and came across FSBrowserNG (https://github.com/gmag11/FSBrowserNG)
But running this in parrallel with NPB, then the leds don't light up.
HW: ESP8266 & 140 SK6812 RGBW
SF NeoPixelBus, FSBrowserNG, rewritten NeoPixelBusFX

Is there any async stuff that blocks the RX (GPIO3) pin that I don't know about? Since if I block out the FSBrowserNG code, the NPB works fine. But when I enable it, it won't set any LED lights

Michael Miller
@Makuna
@Dunky13 It uses the "NeoEsp8266Uart1800KbpsMethod", probably due to a pin restriction. Can use you use GPIO3 pin? If so, switch to "NeoEsp8266Dma800KbpsMethod" method. Or did you do this?
https://github.com/Makuna/NeoPixelBus/wiki/ESP8266-NeoMethods#neoesp8266dma800kbpsmethod
Marc Went
@Dunky13
@Makuna thank you for your reply. I forgot to mention, I changed the methods to the default Neo800KbpsMethod and tried NeoSk6812Method as well.
Michael Miller
@Makuna
@CircuitBaker Shader is a general term of some code applied to each pixel on each call (rather than across the strip like an animation).
Marc Went
@Dunky13
I have it wired (soldered) to the RX pin. So Uart is not a real possibility for me atm, unless I want to change my whole solder paths again (two sided through hole pcb with standoffs to plug the EPS in & out)
Michael Miller
@Makuna
@Dunky13 The Dma method is the best, the most async at the moment (they broke asyncuart with the debug feature about a year ago with no easy way to fix it).
I couldn't find the "setup" method in the example, but I noticed the serial out, what order is the begin called on the serial and NeoPixelBus (see link above about some of the nuances with it).
Marc Went
@Dunky13
@Makuna Thank you for looking into it. I uploaded my code to a repo (https://github.com/Dunky13/NeoPixelBusEFX) Whenever I comment out lines 3-15, 21-37, 49, 56 of main.cpp then the led strip works fine.
Where I rewrote the NeopixelBusFX into flashy.h & flashy.cpp, removed a lot of code as well
Marc Went
@Dunky13
I followed the instruction on referencing the Bus object in another object from the FAQ. But it seems the Async Web server used by FSBrowserNG is interfering somewhere/somehow on RX (GPIO3), don't know why though
Richard
@CircuitBaker
So it's now as simple to just change the animations from strip.SetPixelColor to image.SetPixelColor, then call image.render? If this works this is gonna be so much fun to play around with! Thanks!
Michael Miller
@Makuna
@CircuitBaker it should be that simple.
Richard
@CircuitBaker
Ahh excellent, well in two days your library went from "This is soo damn complicated" to "Wow this seems to make sense" sincerely thank you!
Marc Went
@Dunky13
@Makuna what happens if I end the serial (Serial.end()) to the led control?
This might (will test tomorrow) be the issue esp8266/Arduino#3881
Can I just restart it by saying Serial.begin()?
Or will I need to reinitialize the neopixelbus?
Michael Miller
@Makuna
Serial.end or Serial.begin may reset the pins, which could cause an issue. Why is serial.end being called at all? As long as Serial.begin is called before bus.begin, it should work ok, but you won't be able to recieve anything over serial, just send.
(not sure what happens if you call bus.Begin twice, its just not normal to do so. But in theory it should work
Marc Went
@Dunky13
I'm not saying that it's called. But it is a suggestion mentioned in that issue. That during the ota process the RX pin is unavailable.
Pauluzs
@pauluzs

Hello, i'm using neopixelbus on a esp8266 together with e1.31 to multiplex 16 universes (8 on uart0 and 8 on uart1) while still having serial debug. the way to do this is : void setup() {

// Begin pixels in off state
strip0800.Begin();

// Swap strip0800 on Uart0 from GPIO_01 to GPIO_15
Serial.swap();

// Swap strip1800 on Uart1
strip1800.Begin();

// Write pixel data
strip0800.Show();
strip1800.Show();

// Start SoftwareSerial for debugging
swSer.begin(38400);
swSer.println();
swSer.println("\nSoftware serial started");

only when i try to use 8 more on dma, dma is missing some updates as seen on my scope. tried my own timers as well as the canShow(). without succeeding to get them working correct on the dma. anyone got a hint for this?
Pauluzs
@pauluzs
so what i want to achieve is to use NeoEsp8266AsyncUartx800KbpsMethod twice (already working) and the also use the DMA method
Marc Went
@Dunky13
I thought @pauluzs 's code might help me too, with my pixels not showing at all. So I tried swapping the serial, before, after and during the FSBrowserNG code. But to no avail. @Makuna do you have any suggestions?
Pauluzs
@pauluzs
@Dunky13 the serial part is working, when using one or 2 async methods, but be sure to do it in the order stated above. other combo's wont work
Marc Went
@Dunky13
@pauluzs I don't know if you've looked into my code shared yesterday. My issue lies with an AsyncWebserver (or ArduinoOTA) not playing nice with NPB. When I disable FSBrowserNG (Based on AsyncWebServer & ArduinoOTA) everything works well. DMA running the default 800 method works fine. But I wanted an in-browser SPIFFS editor to update my HTML over the air. But with FSBrowserNG I can't seem to control the led strip op RX (GPIO3) - I haven't tested TX/TX1 as I have a two-sided pcb soldered to the proper connections (using stand-offs, so I can still pnp the 8266)
Pauluzs
@pauluzs
@Dunky13 just had a quick look, atm i'm not using the webserver, animatons or spiffs yet, just feeding straight E131 form xlights. they are however something i would like to use when this is working. Although i'm using OTA which works 4 out of 5 times and the 5th i have to upload twice. so seems your on the right track with the FSBrowserNG
problem
Michael Miller
@Makuna
@Dunky13 Have you contacted the project people for the FSBroderNG about conflicts with Pin 3 and see if they have any insights?
Marc Went
@Dunky13
No as the project isn't in active development atm. But I just found https://github.com/psy0rz/ledanim mentioned in the wiki. So I'm going to look at that, as it seems to do what I need.
Michael Miller
@Makuna
BTW, if level shifting is an issue (from 3.3v to 5v), note that my library supports an Inverted signal feature (add Inverted to the method name (like Neo800KbpsInvertedMethod) and the signal will get inverted. This is very useful for providing a cheap and accurate level shifting, as it can be done with a single transistor. There are some writeups on the web for how to do the electronis.