I came across something that seems quirky to me.

I came across something that seems quirky to me. I was wondering if anybody has some input as to why it is happening.
I have a wearable project running 1820 LEDs. I am using a Teensy 3.1 and control the lights by using my Android phone to turn patterns on and off using bluetooth (Adafruit Bluefruit EZ Link). I made the app using MITs App Inventor. I am using 6 pins from the Teensy to control the lights. 2 pins run 64 lights each. 2 pins run 120 lights each. 2 pins run 666 lights each.
The problem I ran across is that the sketch would freeze up. It was determined that the freeze was happening because of at least one of the pins with 64 lights. When the lights were reduced to 63 lights there was no freezing.
Any suggestions as to why the one pixel, or what ever, could be causing the sketch to freeze.
Also, does anyone have a quick reference to running graphics / pictures or gifs on the pins that have 666 lights. The light grid goes from left to right, down, right to left, down, etc.
Thanks for any input.

For the freezing issue, I wonder if somewhere the code is trying to write to 65 pixels by mistake? Trying to control pixels that don’t exist can cause bad things to happen in memory. You might have something that’s iterating up to NUM_LEDS but it really should be NUM_LEDS - 1.

Have you seen Aaron’s matrix and sprites code?

I don’t think it is trying to write to 65 pixels When I assign the strip to 63 lights all of the LEDs light except for the last one. That leads me to think that it is not trying to read to 65. I will pass it on to the guy helping me with coding and see if it sparks anything for him. Thanks for the input.

@marmil Also, thanks for the link.

@Paul_Sanders If you figure this out I would be interested to hear what was causing the freezing.

Btw, what version of Arduino, FastLED, and Teensyduino are you using? And what type of LEDs?

Teensy 3.1, FastLED - 3.1.1, Teensyduino - 1.35, LEDs WS2812. If I come across the problem I will post it here. I also have a lot of noise in my patterns. When my Teensy is connected to my computer through USB I get light noise. When I touch my lap top I can get more.

How are you powering the LEDs when it’s hooked up to the computer?
Is there a ground connection between everything?
Since you said it’s a wearable, do you get this noise when running everything only on battery power?
Have you tried using a level shifter?