Sunrise to Sunset w/ NeoPixel Strip

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
dwatts
 
Posts: 3
Joined: Sat Mar 23, 2013 8:43 pm

Sunrise to Sunset w/ NeoPixel Strip

Post by dwatts »

I am interested in using the NeoPixel Strip I purchased to simulate a sunrise to sunset. I'm not able to find an example on web using the NeoPixels. I intend to use a RTC. What would be the best way to fade the colors from sunset to sunrise? My project is a fake window, it will be a cross between these two examples: http://window.dasgehtnicht.com/ & https://www.gnr8.biz/brightblind.php. The first link uses analog LEDs; how could this be done with the NeoPixels?

Thanks in advance!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Sunrise to Sunset w/ NeoPixel Strip

Post by adafruit_support_mike »

That shouldn't be hard, you'll just need a large color table.

At any given moment, all the pixels will be the same color, so the main challenge is deciding how quickly you want the colors to change, and what color you want at each instant.

There are 86,400 seconds in a day, and we can simplify things by saying the time between sunrise and sunset is half the day. An array of 4,320 colors would give you 10-second slices through the whole day.

User avatar
Wenborn
 
Posts: 1
Joined: Sun Sep 07, 2014 3:49 pm

Re: Sunrise to Sunset w/ NeoPixel Strip

Post by Wenborn »

You clould use hex colours similar to the one shown in this google images link;

http://www.google.co.uk/imgres?imgurl=h ... B8QMygAMAA

and use the hex values with the neopixels set colour function shown here;

https://learn.adafruit.com/adafruit-ard ... net-colors

only thing is you would probably have to mess with the colour values a bit to get the natural light your after as these colour pallets are going to be too strong as the neopixels light does not get a chance to diffuse as natural ambient light does.

as mike said the day is 86,400 seconds 43,200 sunrise to sunset so you could use your RTC to trigger an event that lasts 43,200 seconds. As shown in the google image of there are 21 colours so thats roughly 2057 seconds a colour, then just fade between them to get essentially 43,200 colours.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”