These are chat archives for Makuna/NeoPixelBus

10th
Jul 2015
Michael Miller
@Makuna
Jul 10 2015 17:44
@sticilface Did you capture your dump file for that stack? When you get the stack trace like that, you need to go to your elf file and do a command line dump of it, which will give a dump of the the addresses to the assembly (with some symbols like function names) so we can look up what that stack represents.
@sticilface What is your heap at startup, you might want to debug print the available heap every minute or so to check that memory isn't being eaten up.
I know igrr has had a intermittent crashes he has been trying to get rid of before he makes the staging into the "public" install, not sure its related.
Michael Miller
@Makuna
Jul 10 2015 17:53
There should be no issues with setting up animations during Setup(), but avoid looping to wait for them to animate. There are a lot of bad habits with Arduino coding, especially around networking, really Setup() should be about quick initial boot setup, while loop should contain all longer running "initialization". An example, connecting to Wifi, is best handled inside loop. Why? If you get disconnected, how do you reconnect? Some State management in Loop as to what mode your app is in (connecting to Wifi, running the normal operations, etc) goes a long way to making the code easier to read.
If you have a consistent small sample where doing the animation starting in Setup() that causes an issue, send it to me (create an issue on GitHub) and I will look into. Try to make the sample just enough to demonstrate the problem.
Michael Miller
@Makuna
Jul 10 2015 18:01
@probonopd How you are doing the animation in the InfoLight is "strange". This gets back to my comment above about app "state" management. You should really try to avoid using the delay() method except where you pass it zero or in simple samples.
If you have one pixel that acts like a "status" light that blinks, then in your update loop you should be checking time deltas to change the state of that status light.
This is going down the path of more advanced topics like tasks, (I have a library to exposes tasks in easy to use wrappers) but basically if you have a bunch of code that is doing time delta checks and doing specific work, then you have "tasks" already.
Michael Miller
@Makuna
Jul 10 2015 22:22
Does anyone use more than one pin for neo pixels?
How many pixels do you run on a single neo pixel bus?
Michael Miller
@Makuna
Jul 10 2015 22:38

@sticilface from iggr on how to get the symbols...

This output is the stack from top (low memory addresses) to bottom (high memory addresses)

 

from stack, you can find out the call chain (which methods were called) and sometimes call arguments or local variables as well

inspecting the stack usually requires you to have disassembled code at hand. it may be obtained by simply running xtensa-lx106-elf-objdump -S yourSketch.elf