So again, this is just me making something that worked. I didn't want to become an Arduino expert, just have something that hangs from the wall. Here is an explanation of what to do if you know nothing about Arduino. I am not anything close to competent in this software. I can only tell you the basics.
First, download the software:
https://www.arduino.cc/en/software
Then you need to create a sketch. There are a bunch of libraries related to LEDS that you can use to start with.
If you message me I am happy to send you my program.
A couple of basics I learned:
"//" in front of any line is a comment and will not be seen by the program
To define a variable it needs to be in all CAPS followed by a value like:
#define DELAY1 100
There are three basic sections:
1 - Defining variables and such
2 - Setup which defines the LEDS which looks like this.
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
}
For some reason I don't understand, the LEDs I recommended are supposed to be WS2811 but it doesn't work but does under WS2812B.
3 - Program, everything inside this (and only that inside this) will run forever:
void loop() {
....program
}
Here is what it looks like:
Screenshot 2021-05-14 203627 (resized).png
Inside the "void loop ()" you can make "for loops" which control various things, in this step I have a For Loop which cycles this sequence 3x and then the loop which drives the sequence:
// Vertical Wipe
// Number of Cycles
for(int i=0; i<3; i++){
// Loop to cycle lights
for(int i=0; i<359; i++){
leds[0] = CHSV(0, 0, 255*pow(sin(3.1415*(i+0)/180),POWER));
leds[13] = CHSV(0, 0, 255*pow(sin(3.1415*(i+40)/180),POWER));
}
}
In a For Loop, int i=0 sets the initial value, i<3 sets the maximum number (when it stops), and i++ just increments it by 1 each time.
The key command to light an LED is in two steps. The first step is to assign values to 1 or more LEDS which is done like this:
leds[59] = CHSV(0, 0, 180);
or
leds[59] = CRGB(180, 180, 180);
CHSV is Hue-Saturation-Value and RGB is Red-Green-Blue. The maximum value for all setting is 255, so the brightest white in each is:
leds[59] = CHSV(0, 0, 255);
leds[59] = CRGB(255, 255, 255);
You can use either but HSV is actually easier because most of what you are doing is likely changing value which requires changing 3 values in RBG but only 1 in HSV. Here is guide for HSV:
gCNJp (resized).jpg
The second part in lighting the leds is:
FastLED.show();
So basically you set the value of 1 or more LEDs with the led[x] command and then issue the FastLED command which sends the signal down the line to all the LEDs. Keep in mind that the actual LEDs will stay in whatever level was set before (even if you unplug the Arduino). They don't need constant commands to stay lit. In fact you need to turn them off. For instance, this a sequence that sequentially turns LEDs off and on:
leds[15] = CHSV(0, 0, 255);
FastLED.show();
delay(500);
leds[15] = CHSV(0, 0, 0);
FastLED.show();
delay(500);
leds[14] = CHSV(0, 0, 255);
FastLED.show();
delay(500);
leds[14] = CHSV(0, 0, 0);
FastLED.show();
delay(500);
So this simple sequence is turning on leds[15] to maximum value, waiting for 500ms, then turning it off. It waits again for 500ms, turns on leds[14] etc...
If you are patient you could program any sequence with this method but it takes a long time. I think it is a good idea to set both the brightness and delay as standard variables, if you want to globally change them it is easy:
#define DELAY2 500
#define INBRIGHT 255
...
leds[15] = CHSV(0, 0, INBRIGHT);
FastLED.show();
delay(DELAY2);
leds[15] = CHSV(0, 0, 0);
FastLED.show();
delay(DELAY2);
leds[14] = CHSV(0, 0, INBRIGHT);
FastLED.show();
delay(DELAY2);
leds[14] = CHSV(0, 0, 0);
FastLED.show();
delay(DELAY2);
One method I used which was much easier was to use the sin function to vary the brightness in a For Loop:
// Rotating Sin
// Number of Cycles
for(int i=0; i<3; i++){ -This Sets a loop which finishes after 3x
// Loop to cycle lights
for(int i=0; i<359; i++){ -This sets a loop which cycles from 0 to 359 or 1 circle
// GIs
leds[59] = CHSV(0, 0, 255*pow(sin(3.1415*(i+90)/180),POWER)); -This varies the GI brightness by the value of Sin (0-1) offset by 90 degrees from 0
// Lower Inserts CCW
leds[16] = CHSV(0, 0, 255*pow(sin(3.1415*(i+75)/180),POWER));
leds[15] = CHSV(0, 0, 255*pow(sin(3.1415*(i+60)/180),POWER));
leds[14] = CHSV(0, 0, 255*pow(sin(3.1415*(i+45)/180),POWER));
leds[13] = CHSV(0, 0, 255*pow(sin(3.1415*(i+30)/180),POWER));
leds[12] = CHSV(0, 0, 255*pow(sin(3.1415*(i+15)/180),POWER));
leds[11] = CHSV(0, 0, 255*pow(sin(3.1415*(i+0)/180),POWER));
And that is about it for what I did. If you want you could brute-force one LED at a time or add in some more advanced features.