Hello,
I am creating a christmas tree using (27) 12V WS2811 leds, a teensy 3.2, Octows2811 sheild, and audio sheild.
I appear to have an incompatibility with fastled and audio libraries.
I my issue is when I include audio library and create some audio objects I get leds flickering on my led strip that fastled isn't driving.
I have removed the audio sheild for testing and have the following setup:
Teensy 3.2 with Octows2811 adapter which connects to teensy with every pin except 6,7,12,14,15.
The following code is a small good example of the flickering I see.
It is the Fastled DemoReel100 stripped down to run just one effect (sinelon)
Without the audio library it runs perfect.
With audio library "#define MY_ISSUE" I see the following issue.
https://youtu.be/jxxxhzGHQQQ
Video will be up in 7 mins.
Using library Audio at version 1.3 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Using library SD at version 1.0.8 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
Using library SerialFlash at version 0.4 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire
Using library FastLED at version 3.1.5 in folder: C:\Users\FPV\Qsync\Arduino\libraries\FastLED
I am creating a christmas tree using (27) 12V WS2811 leds, a teensy 3.2, Octows2811 sheild, and audio sheild.
I appear to have an incompatibility with fastled and audio libraries.
I my issue is when I include audio library and create some audio objects I get leds flickering on my led strip that fastled isn't driving.
I have removed the audio sheild for testing and have the following setup:
Teensy 3.2 with Octows2811 adapter which connects to teensy with every pin except 6,7,12,14,15.
The following code is a small good example of the flickering I see.
Code:
#define MY_ISSUE //include audio library and create a few objects
#ifdef MY_ISSUE
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioPlaySdWav playSdWav1; //xy=136,65
AudioAnalyzePeak peak2; //xy=348,219
AudioAnalyzePeak peak1; //xy=358,171
AudioOutputI2S i2s1; //xy=380,92
AudioConnection patchCord1(playSdWav1, 0, i2s1, 0);
AudioConnection patchCord2(playSdWav1, 0, peak1, 0);
AudioConnection patchCord3(playSdWav1, 1, i2s1, 1);
AudioConnection patchCord4(playSdWav1, 1, peak2, 0);
AudioControlSGTL5000 sgtl5000_1; //xy=155,192
#endif
#include "FastLED.h"
FASTLED_USING_NAMESPACE
#define DATA_PIN 2
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define NUM_LEDS 27
CRGB leds[NUM_LEDS];
#define BRIGHTNESS 96
#define FRAMES_PER_SECOND 120
void setup() {
Serial.begin(115200);
delay(3000); // 3 second delay for recovery
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
// set master brightness control
FastLED.setBrightness(BRIGHTNESS);
}
void loop()
{
sinelon();
// send the 'leds' array out to the actual LED strip
//Serial.print("leds[0]=");
Serial.println(leds[0]);
FastLED.show();
// insert a delay to keep the framerate modest
FastLED.delay(1000/FRAMES_PER_SECOND);
}
void sinelon()
{
// a colored dot sweeping back and forth, with fading trails
fadeToBlackBy( leds, NUM_LEDS, 20);
int pos = beatsin16( 13, 0, NUM_LEDS-1 );
leds[pos] += CHSV( 0, 255, 192);
}
It is the Fastled DemoReel100 stripped down to run just one effect (sinelon)
Without the audio library it runs perfect.
With audio library "#define MY_ISSUE" I see the following issue.
https://youtu.be/jxxxhzGHQQQ
Video will be up in 7 mins.
Using library Audio at version 1.3 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Using library SD at version 1.0.8 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
Using library SerialFlash at version 0.4 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire
Using library FastLED at version 3.1.5 in folder: C:\Users\FPV\Qsync\Arduino\libraries\FastLED