Neopixels help. Help with sunrise/sunset lighting
dannyritchie wrote 04/12/2017 at 20:34 • 0 pointsI'm currently doing a project for my fishtank which is entered into the Hackaday contest and would like somebody to join my team and help me out with the sunrise/sunset feature.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Something along the lines of this https://hackaday.io/project/15709-sunrise-mkii Code is all up on github, along with references. Feel free to ask questions.
Are you sure? yes | no
for some reason i can't seem to find the link for GitHub but not sure if his code would work for me as he says he's coded AVR C++ rather than Arduino code. i will keep looking and try find the source as there may be something that i could use. thanks
Are you sure? yes | no
The github link is on the left hand side of the page (where the links get put when you add them to projects) - https://github.com/dbrown2k/sunrise_clock
I used C++ in AVR but the core code is transferable to arduino (which itself is C++) If you have a look on my projects there is an older version that I wrote for an arduino that was the basis for this project.
Are you sure? yes | no
If you just had one ordinary LED you can control it's brightness by making it flicker on and off really fast - fast enough so that your eyes don't notice it - all you notice is that it's not so bright. I've no idea if you can do this with the neopixel controllers via a suitable transistor, but it might be worth a try on a short strip?
Are you sure? yes | no
Thanks for the input put i find that with the neopixals example code to change the brightness its as easy as setting a value from 0-255, 255 being full brightness and 0 being off
Are you sure? yes | no
For animating neopixels this might be of use (not tried it much yet so don't know if it meets your requirements): https://github.com/DedeHai/NeoPixelPainter
Are you sure? yes | no
I can't help with colours, but if you need something that works out the time when sun sets and rises there's a javascript library that you could get some ideas from: https://github.com/mourner/suncalc
Are you sure? yes | no
if I'm honest it's the whole thing I can do one colour but it's the transition between colours im struggling with. Im just a bit out of my comfort zone with it. I'm not to fussed about having a true sunrise/sunset colour. I'm just wanting it to go from full brightness white and end at blue but with maybe some orange and red. My plan is to do all this on a separate arduino and use two of the outputs for the control.
Are you sure? yes | no
Is it the getting the colors right that you're having issues with?
Are you sure? yes | no