Hi!
I have a Teensy 3.2 with soldered Audio board (Teensy is atop); other connections I have:
All this lies just on my table or my lap. Some wire connections are isolated with duct tape. Some not so well I guess.
Teensy takes power from usb cable. LEDs take power from 5v and gnd wires of another usb cable. Both usb cables are plugged into MacBook.
Test code that I have:
Now to my problem. First, loop in my program may run fine for say 5 iterations and then it's frozed. Some LED just stays lighted and no Serial data coming anymore.
Second, this may be related to the first problem. Quite often (say in 25% cases) uploading code to Teensy says that I need to press pushbutton. Per my understanding this should not happen. Few times Teensyloader said me that auto mode was disabled because Teensy tried to reload too often (or something like this, I haven't had sleep this night and may mess up details).
I'm not really sure as I didn't extensive testing but this hang ups probably weren't happening while I tested Teensy + Audio board in Audio tutorials, without attached LEDs.
How do I debug this case? What is the most probable causes?
I hope this bug could be easily squashed...
I have a Teensy 3.2 with soldered Audio board (Teensy is atop); other connections I have:
- to MIC and GND pins of audio board soldered pins, then wires, then audio jack
- to 7 and 13 pins on the bottom of the Audio board soldered wires which lead to data input and clock input pads of APA102 LED
- behind first LED there are few more, attached sequentially
All this lies just on my table or my lap. Some wire connections are isolated with duct tape. Some not so well I guess.
Teensy takes power from usb cable. LEDs take power from 5v and gnd wires of another usb cable. Both usb cables are plugged into MacBook.
Test code that I have:
Code:
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 5
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 7
#define CLOCK_PIN 14
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(9600);
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);
}
void loop() {
for (var led = NUM_LEDS - 1; led >= 0; led--) {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
Serial.println("Red");
FastLED.show();
delay(5000);
leds[0] = CRGB::Green;
Serial.println("Green");
FastLED.show();
delay(5000);
leds[0] = CRGB::Blue;
Serial.println("Blue");
FastLED.show();
delay(5000);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
Serial.println("Black");
FastLED.show();
delay(500);
}
}
Now to my problem. First, loop in my program may run fine for say 5 iterations and then it's frozed. Some LED just stays lighted and no Serial data coming anymore.
Second, this may be related to the first problem. Quite often (say in 25% cases) uploading code to Teensy says that I need to press pushbutton. Per my understanding this should not happen. Few times Teensyloader said me that auto mode was disabled because Teensy tried to reload too often (or something like this, I haven't had sleep this night and may mess up details).
I'm not really sure as I didn't extensive testing but this hang ups probably weren't happening while I tested Teensy + Audio board in Audio tutorials, without attached LEDs.
How do I debug this case? What is the most probable causes?
I hope this bug could be easily squashed...