Go Down

Topic: Holiday Lighting (Read 963 times) previous topic - next topic

SwinBreaux

Still a Newbie. I have an Arduino Nano with WS2812 strips. Been running different strips to show off the color patterns. And now ready to start setting up color patterns to match the season.

My wife decorates the front door, and dining room table based on the season, and want to do access lighting for the cabinet areas, and front/back porch to match the colors.

I am looking to see if any one has defined color patterns for the different seasons. (Autumn/Thanksgiving, Winter/Christmas, Spring/Easter, Summer/4th of July, etc.)

I've used NeoPixel & FastLED, so familiar with some scripting with both.

Just wanted to see if anyone has defined these color patterns so I don't have to recreate the wheel.

Thanks,
-Swin
Completed Projects: rPi Kodi; RetroPi; rPi & Arduino Nano LED Strip Lighting
In progress: Security System; CarPi
Future: Home Automation; Weather Station; Info System w/Calendar; Drinko Bartender; Smoker/Meat Temp Monitor

knut_ny

Google. RGB888 color picker
Ny

SwinBreaux

Well I was hoping for more feedback. Here is a little more detail on what I am looking for.

The program would let you choose colors:

  - For Autumn = Yellow, Orange, Brown, Red, Purple, Green.

  - For Winter = White, Blue, Red, Green, Purple

  - For Spring = Pink, Violet, Light Blue, Light Green, Orange

  - For Summer = Red, White, Blue

Once you choose the color, the program would cycle through different patterns of the given colors. (Chase, Rainbow, Glitter, Fade, etc.)

Suggestions?
Completed Projects: rPi Kodi; RetroPi; rPi & Arduino Nano LED Strip Lighting
In progress: Security System; CarPi
Future: Home Automation; Weather Station; Info System w/Calendar; Drinko Bartender; Smoker/Meat Temp Monitor

CrossRoads

The choice of colors comes down to your artistic eye. Males, tending to be various degrees of red/green colorblind, may not be the best choice for picking colors.  Why not set up a short strip, 3 knobs with an Arduino, one each for Red, Green, Blue, and have someone with good color perception (i.e. the wife) play with the knobs and adjust the colors to choice. Read the knob settings out so you know what to program to.
AnalogRead returns 0 to 1023, while WS2812B are only 8 bit devices, so you can use analogRead/4 to get 8 bits out and send the 8 bits to the WS2812 so what she sees is what you display later.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

SwinBreaux

Ok. Let me ask this a different way.

I have four sets of colors. Depending on the set I chose, I want that set of colors to go through defined patterns.

How would I do this with a script?
Completed Projects: rPi Kodi; RetroPi; rPi & Arduino Nano LED Strip Lighting
In progress: Security System; CarPi
Future: Home Automation; Weather Station; Info System w/Calendar; Drinko Bartender; Smoker/Meat Temp Monitor

CrossRoads

#5
Nov 22, 2016, 03:28 pm Last Edit: Nov 22, 2016, 03:33 pm by CrossRoads
Code: [Select]
I would put the sets of colors in an array, and then just cycle thru the selected array.
So for example you might have:

Code: [Select]

byte springColorArray [] = {
0x23,0x56,0x78,  0x68,0xa0,0xc2,  0x93,0x58,0xd2, // 3 colors to send out for spring
};
byte summerColorArray [] = {
0x23,0x56,0x78,  0x68,0xa0,0xc2,  0x93,0x58,0xd2, // 3 colors to send out for summer
};
byte fallColorArray [] = {
0x23,0x56,0x78,  0x68,0xa0,0xc2,  0x93,0x58,0xd2, // 3 colors to send out for fall
};
byte winterColorArray [] = {
0x23,0x56,0x78,  0x68,0xa0,0xc2,  0x93,0x58,0xd2, // 3 colors to send out for winter
};
byte spring = 0;
byte summer = 1;
byte fall = 2;
byte winter = 3;

void loop(){
seasonSelected = 0;
if (digitalRead(pin3) == HIGH){
seasonSelected = 2; // seasonSelected = 0 or 2
}
if (digitalRead(pin2) == HIGH){
seasonSelected = seasonSelected +1; // seasonSelected = 0, 1, 2, or 3, or spring-summer-fall-winter
}
if (seasonSelected == spring){
// use Adafruit neopixel library to send out springColorArray[0] to [2], pause?, then [3] to [5], pause? then [6] to [8]
// if you have a string of LEDs all to show the same color, send the 3 bytes out for as many LEDs as you have
}
if (seasonSelected == summer){
// use Adafruit neopixel library to send out summerColorArray[0] to [2], pause?, then [3] to [5], pause? then [6] to [8]
// if you have a string of LEDs all to show the same color, send the 3 bytes out for as many LEDs as you have
}
etc for fall & winter

So maybe something like that if I understand you correctly.
I haven't used the WS2812 library, so I don't know what's involved to have it send out bytes of data from an array.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up