I don't know if this is the right forum for this and I've seen a bunch of similar threads on various forums, but my situation is somewhat unique. I'm wanting introduce a photon torpedo sound effect to coincide with the LED flash in my enterprise refit lighting effect picaxe program.
For the torpedo lighting effect, my code ramps up the red diode on a red/blue bicolored LED (via pwmout), then gives a quick 100ms burst from the blue diode, then the red diode fades out
Then with the next button press, that same sequence of code repeats on another red/blue bi-LED on B.4 and B.5 (14M2 chip), alternating between left and right torpedo launchers on the 32" 1/350 scale USS Enterprise models that I build.
Ok, now to the point. I have a .wav file of the authentic photon torpedo sound effect. I'm wanting to build some sort of slave device to record that file off of my computer and play the sound, having it triggered by the picaxe output pins that control the "blue burst" (through a lower power transistor if necessary).
The wav file is only a 15.5KB, single channel, 8bit sampling, 8khz, nothing fancy. I can build most any small project with a schematic. However, I don't want to spend a bunch of money on it. I've seen these little sound modules like they use for greeting cards that can record and playback tens or even hundreds of seconds of audio. All I need is two seconds of single channel audio. There must be a simple solution for this, but I've looked all over and haven't come up with one.
I'm relatively new to micro-controllers, and hobby electronics in general, though I've learned a whole lot in the few months that I've been playing with it. I could just buy something and connect it into the picaxe somehow, but I would rather build it myself if I can learn how. Any advice would be much appreciated.
For the torpedo lighting effect, my code ramps up the red diode on a red/blue bicolored LED (via pwmout), then gives a quick 100ms burst from the blue diode, then the red diode fades out
Code:
PwmOut PWMDIV4, B.2, 99, 0
For pwmB = 0 To 400 ;ramp up the red LED
PwmDuty B.2, pwmB
Pause 2
Next
High B.3
Pause 100 ;quick burst from the blue side
Low B.3
For pwmB = 400 To 0 Step -1
PwmDuty B.2, pwmB
Pause 2
Next
PwmDuty B.2, 0
Code:
Case 2
PwmOut PWMDIV4, B.4, 99, 0
For pwmB = 0 To 400
PwmDuty B.4, pwmB
Pause 2
Next pwmB
High B.5
Pause 100
Low B.5
For pwmB = 400 To 0 Step -1
PwmDuty B.4, pwmB
Pause 2
Next
PwmDuty B.4, 0
buttonB = 0
End Select
Loop
The wav file is only a 15.5KB, single channel, 8bit sampling, 8khz, nothing fancy. I can build most any small project with a schematic. However, I don't want to spend a bunch of money on it. I've seen these little sound modules like they use for greeting cards that can record and playback tens or even hundreds of seconds of audio. All I need is two seconds of single channel audio. There must be a simple solution for this, but I've looked all over and haven't come up with one.
I'm relatively new to micro-controllers, and hobby electronics in general, though I've learned a whole lot in the few months that I've been playing with it. I could just buy something and connect it into the picaxe somehow, but I would rather build it myself if I can learn how. Any advice would be much appreciated.