play sound of my basic stamp board
poly
Posts: 5
Hi everybody..need help here....I already have my set up working for my christmas lights...I'm using a parallax basic stamp board and 4-relay board....I want to be able to play my sequense music on my speakers outside my house...PLEASE ADVICE....
Comments
How would the sound generation and light control work together? How about attaching a source file for your program as it stands?
(1) HomeWork Board with BASIC Stamp
(5) 470 Ω Resistors
(3) Green LEDs
(2) Red LEDs
(1) Piezospeaker
(1) 5-Position Switch
this is the code
' {$STAMP BS2}
' {$PBASIC 2.5}
HIGH 15 ' Turn on all LEDs
HIGH 14
HIGH 13
HIGH 12
HIGH 11
FREQOUT 8, 2000, 3000 ' Play a tone
DEBUG CLS, ' Display directional graph
" ", CR,
" | ", CR,
" - - ", CR,
" | ", CR
' Display which direction is pressed on the 5-Position Switch
DO
IF (IN0 = 0) THEN DEBUG CRSRXY, 2, 2, "<" ELSE DEBUG CRSRXY, 2, 2, " "
IF (IN1 = 0) THEN DEBUG CRSRXY, 5, 4, "v" ELSE DEBUG CRSRXY, 5, 4, " "
IF (IN2 = 0) THEN DEBUG CRSRXY, 8, 2, ">" ELSE DEBUG CRSRXY, 8, 2, " "
IF (IN3 = 0) THEN DEBUG CRSRXY, 5, 2, "o" ELSE DEBUG CRSRXY, 5, 2, " "
IF (IN4 = 0) THEN DEBUG CRSRXY, 5, 0, "^" ELSE DEBUG CRSRXY, 5, 0, " "
PAUSE 20
LOOP
SEE I'M USING MY OUTPUTS TO CONTROL A 4-RELAY BOARD THAT IS CONTROLLING THE POWER OUTPUT TO FOUR 120V OUTLETS THE LIGHTS CHANGE WITH THE MUSIC BUT IT IS NOT LOUD ENOUGH I WANT TO BE ABLE TO CONECT MY COMPUTER SPEAKERS TO IT....