Hello guys
I am very new in this arduino "job".
I need to use 4 pieces of an WS2811 led strip (12v) and each piece needs to be controlled.
I managed to make "the first" step, that is to turn it on and make my very first "loop".
I managed to use control 2 stripes, and give each led (3 LEDs because it is WS2811 12v) the color I want.
In the same way I know I can turn all of each stripe on the color I want.
I am using my phone now, so i cannot share the sketch, but being my very first "play time" with arduino, i basically defined the two strips, included the fastled, and assigned each led a specific color (i used the rgb color definition instead of simple red, green or blue, i used the "(0,255,0) etc definitions.,
The things are pretty simple:
I want :
One stripe (18 total LEDs (6 for arduino control) -each 6 on its own color)
Two (2x15 total LEDs) stripes on Red
One (21 total LEDs) stripe on White.
Now...
I want to use a remote (i have all the hardware needed (maybe)), to switch and to be able to switch the red stripes to white.
I managed to decide the remote (115200 baud rate) but i have no idea how to assign a specific button press on the remote just to switch a specific "loop".
For example, if I press the 1 button, i want for the red stripes to change to white, for 2 i want the white stripe to turn off, off course the on/off button to turn it all on and off.
Thanks
Bellow is the code i used.
#include <FastLED.h>
//#define NUM_STRIPS 2
#define NUM_LEDS 6
//#define DATA_PIN
#define NUM_LEDS2 10
//#define DATA_PIN2 7
CRGB leds[NUM_LEDS];
CRGB leds2[NUM_LEDS2];
void setup() {
// put your setup code here, to run once:
//delay(2000);
FastLED.addLeds<NEOPIXEL, 6>(leds, NUM_LEDS);
FastLED.addLeds<NEOPIXEL, 7>(leds2, NUM_LEDS2);
}
void loop() {
// put your main code here, to run repeatedly:
leds[0] = CRGB(1,255,1);
leds[1] = CRGB(1,255,1);
leds[2] = CRGB(255,1,155);
leds[3] = CRGB(255,1,155);
leds[4] = CRGB(255,1,1);
leds[5] = CRGB(255,1,1);
leds2[0]= CRGB(255,1,1);
leds2[1]= CRGB(255,1,1);
leds2[2]= CRGB(255,1,1);
leds2[3]= CRGB(255,1,1);
leds2[4]= CRGB(255,1,1);
leds2[5]= CRGB(255,1,1);
leds2[6]= CRGB(255,1,1);
leds2[7]= CRGB(255,1,1);
leds2[8]= CRGB(255,1,1);
leds2[9]= CRGB(255,1,1);
FastLED.show();
}
DRAPEL_SI_ROSU.ino (879 Bytes)