BASIC STAMP "Robot Song Project" - The Beatles
BrendanTheONeill
Posts: 1
Just copy+paste this code into BS2 and do a "Syntax Check" then upload. It's a good Beatles song.
' {$STAMP BS2}
' {$PBASIC 2.5}
a CON 831
b CON 932
c CON 1047
d CON 1109
e CON 1245
f CON 1397
ah CON 1661
DO
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 150, d
FREQOUT 4, 150, b
FREQOUT 4, 350, f
FREQOUT 4, 350, f
FREQOUT 4, 600, e
PAUSE 50
FREQOUT 4, 150, a
FREQOUT 4, 100, b
FREQOUT 4, 150, d
FREQOUT 4, 150, b
FREQOUT 4, 350, e
FREQOUT 4, 350, e
FREQOUT 4, 550, d
PAUSE 50
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, d
FREQOUT 4, 250, e
FREQOUT 4, 250, c
FREQOUT 4, 250, b
FREQOUT 4, 350, a
PAUSE 100
FREQOUT 4, 250, a
FREQOUT 4, 400, e
FREQOUT 4, 600, d
PAUSE 200
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 300, f
FREQOUT 4, 300, f
FREQOUT 4, 500, e
PAUSE 50
FREQOUT 4, 100, a
FREQOUT 4, 100, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, ah
FREQOUT 4, 250, c
FREQOUT 4, 250, d
FREQOUT 4, 250, c
FREQOUT 4, 350, b
PAUSE 50
FREQOUT 4, 100, a
FREQOUT 4, 100, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, d
FREQOUT 4, 250, e
FREQOUT 4, 250, c
FREQOUT 4, 250, b
FREQOUT 4, 350, a
PAUSE 100
FREQOUT 4, 250, a
FREQOUT 4, 400, e
FREQOUT 4, 600, d
PAUSE 100
LOOP
' {$STAMP BS2}
' {$PBASIC 2.5}
a CON 831
b CON 932
c CON 1047
d CON 1109
e CON 1245
f CON 1397
ah CON 1661
DO
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 150, d
FREQOUT 4, 150, b
FREQOUT 4, 350, f
FREQOUT 4, 350, f
FREQOUT 4, 600, e
PAUSE 50
FREQOUT 4, 150, a
FREQOUT 4, 100, b
FREQOUT 4, 150, d
FREQOUT 4, 150, b
FREQOUT 4, 350, e
FREQOUT 4, 350, e
FREQOUT 4, 550, d
PAUSE 50
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, d
FREQOUT 4, 250, e
FREQOUT 4, 250, c
FREQOUT 4, 250, b
FREQOUT 4, 350, a
PAUSE 100
FREQOUT 4, 250, a
FREQOUT 4, 400, e
FREQOUT 4, 600, d
PAUSE 200
FREQOUT 4, 150, a
FREQOUT 4, 150, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 300, f
FREQOUT 4, 300, f
FREQOUT 4, 500, e
PAUSE 50
FREQOUT 4, 100, a
FREQOUT 4, 100, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, ah
FREQOUT 4, 250, c
FREQOUT 4, 250, d
FREQOUT 4, 250, c
FREQOUT 4, 350, b
PAUSE 50
FREQOUT 4, 100, a
FREQOUT 4, 100, b
FREQOUT 4, 100, d
FREQOUT 4, 100, b
FREQOUT 4, 450, d
FREQOUT 4, 250, e
FREQOUT 4, 250, c
FREQOUT 4, 250, b
FREQOUT 4, 350, a
PAUSE 100
FREQOUT 4, 250, a
FREQOUT 4, 400, e
FREQOUT 4, 600, d
PAUSE 100
LOOP
Comments
Jessica Uelman put a thread named Christmas Carols with Light Display on 12-4-09 and it has four songs on it. Please look it up in advanced search. I made up my own song called Good King Wenceslas. Here is my code:
By the way, welcome to the forums.