Good day all, I recently decided to pick up a new hobby and in the spirit of the season will endeavor to create a Christmas lights display unit.
I have found a number of tutorials online that I will use to assist me with everything (adjusting to my liking as I go), but I had an idea of something I'd like to set up that I haven't found completed or even attempted anywhere.
Short background on me:
30 years in the electronics/computers industry.
Started off doing board level repairs on WYSE terminals and PCs.
Minor experience with programming in PHP, batch and vb-script.
My question to you all is basically one of feasibility, as in "is this possible".
Now, on to the idea.....
Looking at building a control unit for Christmas tree lights that will sync with music.
I'd like to set it up with 2 modes of operation, one which will be rather serene using 2 channels of white lights set to "playlist 1". (This would be mode 1)
There will be an external hardware switch that when activated will switch to mode 2, lighting a different series of channels with colored lights and "playlist 2" which would only consist of one song.
Now, the above I'm fairly sure can be done, it's the following piece that I can't figure out how to set up (or even if it can be done).
The external switch would need to "disable" for a set amount of time until the playlist ends.
Lets say playlist 2's song is 2:16 long. Activating the switch opens playlist 2 and activates the light channels, what I want to stop is another activation of the switch in the middle of the song, thereby restarting it again or otherwise fouling it up.
Is there a way to stop monitoring the switch pins for at least 2:16 to allow the song to complete and reset to mode 1 before it can be activated again?
Any ideas will be greatly appreciated, thank you!!
Cough? Yeah, it Looks terrible. The Compiler will fix it any way because it’s all constants. (Although, have I really tested if the Arduino Compiler does that? Hmm.)
The OP was talking about 2 minutes 16 seconds and the formula can be related to that. If I had written 136000, would it have been any more obvious?
Where's the music coming from? Do you have a music card/shield that the Arduino can control as well as a couple of relays to control the lights being on/off?
MP3 module:
Here's one running with AC powered LED light strings, with one wire cut to go thru the relay. Probably safer to have this in a box with wall outlets the relays controlling power to the outlets.
The hardware end of things I've got taken care of. (This was the least of the challenges... )
For the music I was looking into the rMP3 shield you listed. I haven't gotten far enough into it yet, but I believe the rMP3 is the only way this'll work.
Lots more research to do in any case!
CrossRoads:
Where's the music coming from? Do you have a music card/shield that the Arduino can control as well as a couple of relays to control the lights being on/off?
MP3 module: rMP3 Playback Module – Rogue Robotics
Female header sets available here www.dipmicro.com
And I offer relay cards, both in a shield format, and trimmed down to just the relay/shift register portion Cross Roads Electronics
Here's one running with AC powered LED light strings, with one wire cut to go thru the relay. Probably safer to have this in a box with wall outlets the relays controlling power to the outlets. MVI 2958 - YouTube
And testing of the standalone cards MVI 3167 - YouTube
Remember to keep your wiring secured - and maintain a 'safe' distance between your low voltage and AC wiring.
A solder blob or wire hair can do a lot of damage!
I pretty much always over calculate my safety margins to near non-sensical levels (my Dad was an engineer, it's in my blood), plus I like my work to look GOOD.