HELP2! Adding a new subroutine to my program causes other subroutines to be sporadic

Status
Not open for further replies.
Help again! Tried lots of things. Got rid of all compile warnings and narrowed the problem down to 4 lines of code plus 3 to get rid of a do while loop (line inside loop ok) If these 7 lines are commented out then firework subs work fine. If any ONE of the 4 lines or the do while loop is uncommented then I get the erratic firework behavior with eventual hang (which behavior always occurs exactly the same no matter which line is uncommented). Also, if I copy and paste ONE of these 4 lines into another subroutine, it will cause the same problem until commented out. Don't know if this is significant, but each of the 4 lines contain variables that are unsigned long variables, while lines among and after these 4 lines do not! I did try moving rain variable declarations to within the rain sub, but still same problem. I was thinking of trying the Arduino Pro IDE which looks like it has an easy interface to work with for debugging. I think it is still beta, any thoughts on it? I've attached a new copy of the sketch with the lines commented out in the rain subroutine. Again, anytime you can spare to help me is much, much appreciated!!
 

Attachments

  • Tree_Show.txt
    45.9 KB · Views: 53
note : Starting a new thread lost any context/history on the old thread.

Looking at the 45KB of text it is not clear what lines this refers to?: "If these 7 lines are commented out then firework subs work fine." or "copy and paste ONE of these 4 lines"

Not seen any activity on PJRC forum for the IDE Pro - or if or how debug would apply to using Teensy there - and suspect TeensyDuino would not install?

There is a GDB Debug thread that allows that with current installed files just using that library.

See : pjrc.com/threads/61373-Using-GDB-with-Teensy-without-hardware-debugger-first-Beta

and that refers to : github.com/ftrias/TeensyDebug
 
Dear defragster,
Thank you for your response! Sorry, I'm a newbie to this posting process and didn't think to add info to help those joining after the first post which was just "HELP! Adding a new...". The project is a "Christmas tree", the prototype of which has 10 strands of 40 WS2811 leds each. I wrote code to fill tree with bands/strands of colors that move, then I added code to display aerial fireworks. All worked well. Then I added a subroutine to display falling "rain", which worked fine, but then when I try to display the fireworks, they are erratic and finally hang. If you are interested, I would appreciate your help. The commented out lines mentioned above are in the void rain() sub which starts at line 897. The rain variables are declared at the beginning of the program (line 63). The 7 commented out lines begin on line 948. Again, thanks!
 
Status
Not open for further replies.
Back
Top