Custom Lamp Help

Status
Not open for further replies.

BuffaloFan32

Well-known member
Hi, I am building a lamp that has a picture of the moon on the front but is back-lit by WS2812 LEDs. I would like the back lights to reflect the current phase of the moon every night. I have done other projects so I know I can control the LEDs with the Teensy, my problem is figuring out how best to tell the Teensy what the current phase of the moon is.

I will be connecting the lamp to a wall outlet that is controlled by a wall switch in the bedroom so reducing lag time between flipping the switch and seeing the LEDs is important. I am also trying to make this consume as little extra power as possible so I am trying to avoid hooking it up to a big computer or something (I try to be as green as possible).

It would also be cool if I could change the LED colors or pattern remotely with my phone.

All ideas are welcome!

moon.png
 
I've seen sites that show how to calculate the phase based on a data. Some methods are better than others. Then get your RTC working on the Teensy and add a battery back up connected to VBAT. Set the clock, create the equation based on data, and all should work. I guess--never tried it.

Several ways to change the color pattern via the phone 1) could be done by adding a bluetooth module and have phone send data through bluetooth. MIT appinventor can help you create such app (not sure if it supports iPhone). 2) connect an internet module to your Teensy and connect to your internet and act as a server, then have Teensy create a web page so any device connected to your home internet could control the page. Either are a bit involved unless you know your way around getting free libs to work. I've done both methods here to turn lights on/off.
 
Thanks @KrisKasprzak! I have never tried to use my Teensy to create a webpage but maybe that is the way to go. I am a bit of a novice so any hardware advice or code snippets you have would be greatly appreciated. For now, I am firing up the Google machine to try and figure it out.
 
Not indicated which Teensy? T_3.2 does if a crystal is added, and T_3.5 and later have working RTC onboard without an added crystal.
 
Status
Not open for further replies.
Back
Top