BS2 Questions??
Archiver
Posts: 46,084
Hi everyone, I am trying to play voice messages using the stamp II and
quadravox voice chip. I'm using the following code to play a message:
SEROUT pin#, baudrate, [noparse][[/noparse]message#]. The problem I am having is that I can
get it to play message# 0 and 1, but no other messages will play. I have
tried all the different baud rates possible. Sometimes it will play
message# 3, where it should play message# 1. I have 4 messages stored onto
the chip.
2nd problem -- I am building a security system. In my code to alarm the
siren, I am using a FOR loop. Ex:
FOR siren1 = 1 TO 1
OUT1=1
NEXT
PAUSE 30000
This will set the siren off for 30 seconds. The problem is that I need the
stamp to look at an IF statement during this 30 seconds. I also need an
output flashing my parking lights during this 30 seconds. Any suggestions
would be greatly appreciated. Thanks,
Tyson
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
quadravox voice chip. I'm using the following code to play a message:
SEROUT pin#, baudrate, [noparse][[/noparse]message#]. The problem I am having is that I can
get it to play message# 0 and 1, but no other messages will play. I have
tried all the different baud rates possible. Sometimes it will play
message# 3, where it should play message# 1. I have 4 messages stored onto
the chip.
2nd problem -- I am building a security system. In my code to alarm the
siren, I am using a FOR loop. Ex:
FOR siren1 = 1 TO 1
OUT1=1
NEXT
PAUSE 30000
This will set the siren off for 30 seconds. The problem is that I need the
stamp to look at an IF statement during this 30 seconds. I also need an
output flashing my parking lights during this 30 seconds. Any suggestions
would be greatly appreciated. Thanks,
Tyson
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Comments
tysonwhitt@h... writes:
> 2nd problem -- I am building a security system. In my code to alarm the
> siren, I am using a FOR loop. Ex:
>
> FOR siren1 = 1 TO 1
> OUT1=1
> NEXT
> PAUSE 30000
>
> This will set the siren off for 30 seconds. The problem is that I need
the
> stamp to look at an IF statement during this 30 seconds. I also need an
> output flashing my parking lights during this 30 seconds. Any suggestions
> would be greatly appreciated. Thanks,
User a FOR/NEXT loop to do your long delay -- this code will scan your IF
statement every 250 milliseconds:
FOR delay = 1 TO 120
IF foo THEN bar ' put your code here
PAUSE 250 ' 120 x 250 ms = 30 seconds
NEXT
-- Jon Williams
-- Dallas, TX