Hey guys,
I'm relatively new to the Arduino world, but I'm thoroughly enjoying myself so far.
I'm trying to control 3 (linked together) WS2811 LED strips (a total of 276 pixels) via my Arduino Uno R3 via the Blynk app for iPhone.
I have no problems running standard light sketches (DemoReel100, etc) or my own custom sketches straight off the Arduino onto all 276 lights, but when I try to use Blynk to control them I seem to only be able to control 70 pixels, after which (when I up the NUM_LEDS value any higher) they don't respond anymore.
Could this be a memory problem? When I verify my sketch it says I'm using 32% of program storage space, and 62% of dynamic memory.
Any ideas/suggestions would be greatly appreciated.
Here is my code:
#include<FastLED.h>
#include <BlynkSimpleSerial.h>
#include <SoftwareSerial.h>
SoftwareSerial SwSerial (2, 3); // RX, TX
#define NUM_LEDS 70
#define DATA_PIN 8
#define LED_TYPE WS2811
#define COLOR_ORDER BRG
int varHue = 0;
int varSaturation = 0;
int varBrightness = 0;
CRGB leds[NUM_LEDS];
char auth[] = "b8380ea6419e4406904989aff698029a";
void setup()
{
delay(1000); //LED safety delay
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); //for correct LED strips
Blynk.begin(auth);
}
BLYNK_WRITE(V0)
{
varHue = param.asInt();
}
BLYNK_WRITE(V1)
{
varSaturation = param.asInt();
}
BLYNK_WRITE(V2)
{
varBrightness = param.asInt();
}
void loop()
{
Blynk.run();
fill_solid(leds, NUM_LEDS, CHSV(varHue, varSaturation, varBrightness));
FastLED.show();
}