SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By sparkman
#191601
I am working on an Christmas train setup and would like to synchronize various actions with music. Maybe best to describe what I want this thing to do and perhaps someone can tell me if this is possible or am I just completely crazy.

I built a e-cigar smoke generator which provides a "toy factory" chimney with smoke for a period of time (15 seconds) then pauses 45 seconds. This is currently being accomplished with a adjustable interval timer which I would prefer to handle via code.

A fairly long list of traditional Christmas music plays via a Bluetooth speaker (Bose) - currently, this requires an iPod or other device to stream the music to the Speaker.

I found the old "looney tunes factory music" (https://youtu.be/qaC0vNLdLvY at about the 1:25 mark on the track) which I would like to play while the smoke generator is doing its thing and pause the Christmas soundtrack(s) while this is going on. Essentially, building a mini audio mixer, I guess.

So, I thought about using two separate mp3 players (one playing the long list of Christmas music, and the second with the "factory" music) and just alternating the volume on each at the appropriate time in code.

The main question I have is this - are one of the various bluetooth modules capable of accepting audio input and then streaming that input to the BT speaker? Every example I have seen shows these BT modules receiving a stream from something and playing it on a small speaker. What I want it to do is pair with and steam sound TO the BT speaker. Is this possible?

Pseudo code would go something like this:

while TRUE {
Play Christmas soundtrack
count >=45 seconds {
pause Christmas soundtrack.
turn on power to smoke generator.
play "factory" music for 15 seconds.
turn off power to smoke generator.
stop "factory" music.
un-pause/play Christmas soundtrack.
count = 0
}
}

I have been programing in (C, Java, Pascal, etc.) for 30 years, but never had the opportunity to mess with any of this arduino stuff. I am pretty confident I can handle the code, what I don't know is the capability of the BT modules.

Any help or suggestions would be of great appreciated.