Hi there - this might be a very basic easy question and the answer is right under my nose, but please help me out!
I am using a WS2812 addressable rgb led strip and I have found and tried libraries, all work fine. However, all that I want it to do is light up all the LED's the same colour and for some reason can not figure out how to do this!!
At the end what I would like it to do is when i push a button it does a sunrise cycle, all the same colour at the same time, then another button and its daytime balanced and the third button would be sunset.
So far I have been coding with a single RGB LED so I can at least show the concept (this is for a design thesis and need to do user-testing). Right now I have the sunrise cycle to work properly, no buttons yet or daylight or sunset.
I am using this RGB LED library: https://github.com/amthenia/LED which has been very straightforward to use and set up.
The code I have for the single RGB LED is below.
So to restate my question:
What I would like to know is how to make all the colours on the RGB LED addressable strip to be the same colour at the same time.
OR is there an alternative strip I can use? I went to my electronic engineering shop here in toronto (creatron) and she told me that the only led strips they have that work all together will change to red green or blue only and you can't mix them, which is useless to me as i need a fade between colours.
#include <LED.h>
int LEDArray[] = {11,10,9}; // Red, Green, Blue
LED LED1(LEDArray);
int brightness = 0;
void setup() {
}
void loop() {
analogWrite (LEDArray, brightness);
//sunrise
byte start_color1[] = {255, 129, 0}; //1850k
byte end_color1[] = {255, 146, 38}; //2190k
byte start_color2[] = {255, 146, 38}; //2190k
byte end_color2[] = {255, 175, 104}; //2920
byte start_color3[] = {255, 175, 104}; //2920
byte end_color3[] = {255, 185, 127}; //3260
byte start_color4[] = {255, 185, 127}; //3260
byte end_color4[] = {255, 195, 146}; //3601
byte start_color5[] = {255, 195, 146}; //3601
byte end_color5[] = {255, 209, 171}; //4111
byte start_color6[] = {255, 209, 171}; //4111
byte end_color6[] = {255, 219, 190}; //4565
byte start_color7[] = {255, 219, 190}; //4565
byte end_color7[] = {255, 255, 201}; //4849
byte start_color8[] = {255, 255, 201}; //4849
byte end_color8[] = {255, 228, 207}; //5019
byte start_color9[] = {255, 228, 207}; //5019
byte end_color9[] = {255, 243, 232}; //5813
byte start_color10[] = {255, 243, 232}; //5813
byte end_color10[] = {255, 247, 238}; //6040
byte start_color11[] = {255, 247, 238}; //6040
byte end_color11[] = {255, 250, 244}; //6266
byte start_color12[] = {255, 250, 244}; //6266
byte end_color12[] = {255, 254, 250}; //6500
// Fade from start to end
LED1.Fade(LEDArray, start_color1 , end_color1, 5);
delay(1000);
LED1.Fade(LEDArray, start_color2 , end_color2, 5);
delay(1000);
LED1.Fade(LEDArray, start_color3 , end_color3, 5);
delay(1000);
LED1.Fade(LEDArray, start_color4 , end_color4, 5);
delay(1000);
LED1.Fade(LEDArray, start_color5 , end_color5, 5);
delay(1000);
LED1.Fade(LEDArray, start_color6 , end_color6, 5);
delay(5000);
LED1.Fade(LEDArray, start_color7 , end_color7, 5);
delay(5000);
LED1.Fade(LEDArray, start_color8 , end_color8, 5);
delay(5000);
LED1.Fade(LEDArray, start_color9 , end_color9, 5);
delay(5000);
LED1.Fade(LEDArray, start_color10 , end_color10, 5);
delay(5000);
LED1.Fade(LEDArray, start_color11 , end_color11, 5);
delay(5000);
LED1.Fade(LEDArray, start_color12 , end_color12, 5);
delay(5000);
}