Pursuing quite a rigorous and code-intensive project right now, which may expand later should I decide to utilize the unused pins. I am setting up 5 mirrors, 2 pairs of the same size (small, medium), and a single large mirror, with 25(x2)/35(x2)/48(x1) WS2812B pixels on each mirror(Small[x2]/Medium[x2]/Large[x1]). I have made many attempts at manipulating the different examples for multiple strips and "array-within-array" (FastLED) code tactics to tackle this, but alas, I am at a loss.
The problem is that the code examples there define the number of pixels for all the strips to be the same variable (and, therefore, the same number), which I cannot do. Being that I have 3 lengths total, will I need to define 3 separate lengths for each size mirror and then setup 3 different types of mirrors, two of which would be an array-within-array style due to duplicate sizes?
Many thanks for the help, if you're interested in what purpose they will serve, they're just a decoration going in my room to fill an empty wall. Each mirror will have a PIR sensor on either side of it and when you pass by it will animate according to the locations that were broken. The default mode of display will have the RTC push the time in the form of a clock to the largest mirror (since it's 48 LEDs, it will roughly display which ~5 minute increment the time is closest to. Modes will be changeable via BT connection on the phone. Future possible inclusions: IR Receiver/Transmitter pair for controlling in-room electronics/appliances (TV, Cable, in-wall AC), wiring a 350MHz controller to 5 pins for controlling my fan/light.
Cheers
Anselmo C.
Too much information.
You have three different lengths in a string.
There's a numpixel variable (Adafruit library) which is the number of pixels in a string.
pixels.setPixelColor(whichpixel, pixels.Color(0,0,0)); // dark
"whichpixel" can be a variable or a 'magic number' (a number not declared a variable) for the position to write to.
I appreciate your answer, however, I don't think that's going to solve my issue. I have already fiddled around with the adafruit libary for Neopixels, didn't quite work out.. Calling to any other strip and then pushing it to show would only light up the first strip. I would have to manually program every one of the 168 pixels that are divided into 5 LED strings, and there is a much simpler way of going about it than Adafruit's method of coding.. Thanks though.
Hoping someone with some FastLED knowledge/experience or someone who has gone through this can shed some light on what I'm dealing with.
Thank you so much, that's exactly what I've been trying to do. The thing is, the ones that have length of 35 and 25, I have 2 of those strips (e.g. 2x25 pixel and 2x35 pixel strips). Would it be okay to use the same variable for the number of pixels when I define those separate CRGB arrays? I would just have to call those separate strips whenever I want them to show?
Edit: That post at the bottom with "2 animations at the same time" is something I've been looking for too, I really appreciate that
I've ran into a problem and could use help please. This issue seems similar.
I'm running about 480 LEDS in my setup with a teensy 3.1 and octosw2811. I have 6 strips with different amount of leds . How do I define the amount of leds per strip. For example
Strip #1 num of leds is 61,
Strip #2 num of leds is 86,
Strip num 3 is 94,
Strip #4 num of leds is 86,
Strip #5 num of leds is 61,
Strip #6 num of leds is 94.
I didn't realize that the strips need to be parallel. I thought I could just set the # of leds vertically and horizontally like I did in Ambibox.
You should start your own thread for this, not hijack someone else's thread. The problem may sound similar to you, but your hardware sounds quite different.
Here is my code that has 41 neopixels on pin 8 and 120 neopixels on pin 3. Total LED count is 161.
It is running a modification of the juggle code.
// MultipleStripsInOneArray - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on
// using multiple controllers. In this example, we're going to set up four NEOPIXEL strips on three
// different pins, each strip will be referring to a different part of the single led array
#include <FastLED.h>
#define NUM_LEDS_PER_STRIP_A 120
#define NUM_LEDS_PER_STRIP_B 41
#define NUM_LEDS 161
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, 3>(leds, 0, NUM_LEDS_PER_STRIP_A);
FastLED.addLeds<NEOPIXEL, 8>(leds, 120, NUM_LEDS_PER_STRIP_B);
}
void loop() {
fadeToBlackBy( leds, NUM_LEDS, 50);
byte dothue = 108;
for( int i = 0; i < 4; i++) {
leds[beatsin16( i+1, 0, NUM_LEDS )] |= CHSV(dothue, 250, 150);
dothue += 32;
FastLED.show();
}
}