Hi Everyone,
First of all, massive thanks to Hans for fantastic info and tutorials.
I have 3D printed this Star in preparation for Christmas http://www.thingiverse.com/thing:816216
The thing is, I wanted to make it more attractive than the standard code that is there currently.
My thoughts are that I would like to have each arm of the star controllable in their own right, ie to flash each arm sequentially to have a rotating effect.
I would also like to be able to light each 'ring' independently to, for a scrolling outward/inward effect.
Having read the tutorials here, I though 2 dimensional arrays were my answer ... or have I got that wrong?
I have succesfully tested the one dimensional array and it works great, more importantly, I have learnt a lot.
I then progressed to trying the 2D array, thats where it has all gone pear shaped :-)
I have a string of 18 WS2811 layed out in a zig zag grid formation, I wanted to be able to have a row light up and scroll down, and the same for columns.
Would you have a minute to look through my code below and perhaps offer some pointers.
Thank you so much for your time
#include <Adafruit_NeoPixel.h>
#define arms 5
#define lightPerArm 4
#define PIN 6
Adafruit_NeoPixel strip = Adafruit_NeoPixel(19, PIN, NEO_RGB + NEO_KHZ800);
void setup() {
int Star[arms][lightPerArm] = { { 0,1,2,3 },
{ 4,5,6,7 },
{ 8,9,10,11},
{ 12,13,14,15},
{ 8,9,10,11 }};
strip.begin();
strip.setBrightness(40); //adjust brightness here
strip.show(); // Initialize all pixels to 'off'
for(int arm=0; arm<=arms-1; arm++) { // Count ARMS
// strip.setPixelColor(Star[arm], strip.Color(0, 0, 0)); // Background pixel colour
for(int light=0; light<=arms-1; light++) { // Count LIGHTS per ARM
strip.setPixelColor(Star[(lightPerArm+arm+1)%19], strip.Color(5, 250, 200)); //change RGB color value here
}
strip.show();
delay(60);
}
}