Vmusic help

MurrayJ

Senior Member
I am trying a simple random code for the Vmusic and cant ge ti to play sounds, the serial line in the program has an error that I can see I think -


setfreq m8
pause 1000

main:
random w0
w1 = w0 // 18 + 1
serout 4,n9600_8,("vpf ",w1,".mp3",CR)
wait 4
goto main



Can anyone tell me what I am doing wrong?
Note - the N is because I am using the ULN chip and needs an "N" instead of "T".
Also is a resistor needed on the serialout line if the ULN chip is used and what size.

Thanks
 
Last edited:

hippy

Technical Support
Staff member
You probably want a # in front of w1 ...

- serout 4,n9600_8,("vpf ", # w1,".mp3",CR)

Personally I'd ignore the ULN and take a feed directly from the PICAXE. It just adds another level of complication.
 

MurrayJ

Senior Member
Thanks hippy, now working but I have another question about volume. Part of my program -

vol2:
serout 4,n9600_8,("vwr",$0B,$55,$55,CR)
pause 500
goto waiting


Doesnt want to change the volume though.
 

administrator

Administrator
Staff member
the volume command was an addition in later firmware, make sure your firmware is up to date. Previous to that you had to poke the VS1001 registers directly (search the forum for previous vmusic2 posts for info)
 
Top