DO and LOOP not supported??
Archiver
Posts: 46,084
Just got the BOE rev C BS2 board.
Running "Basic Stamp v2 Editor".
DO and LOOP do not work as below??
The syntax coloring doesn't make DO or LOOP blue as it does HIGH,
PAUSE and LOW.
Something's wrong. What is it? The loop only executes once! Should do
it forever, right?
THX if you can help!
'
'{$STAMP BS2}
DO
HIGH 14
PAUSE 500
LOW 14
PAUSE 200
LOOP
'
This one blinks my LED.
'
'{$STAMP BS2}
Idx VAR Word
'start:
FOR Idx = 0 TO 3
DEBUG " ", DEC Idx
HIGH 14
PAUSE 500
LOW 14
PAUSE 500
NEXT
DEBUG " STOP"
STOP 'Stops the program
'
But this one fails to hold an infinite loop and keep the light on??
It blinks and apparantly exits the program without regard to
the endless repeat loop.
I guess sometimes the simplest things don't work! HELP!!!
'
'{$STAMP BS2}
HIGH 14
repeat:
GOTO repeat
Running "Basic Stamp v2 Editor".
DO and LOOP do not work as below??
The syntax coloring doesn't make DO or LOOP blue as it does HIGH,
PAUSE and LOW.
Something's wrong. What is it? The loop only executes once! Should do
it forever, right?
THX if you can help!
'
'{$STAMP BS2}
DO
HIGH 14
PAUSE 500
LOW 14
PAUSE 200
LOOP
'
This one blinks my LED.
'
'{$STAMP BS2}
Idx VAR Word
'start:
FOR Idx = 0 TO 3
DEBUG " ", DEC Idx
HIGH 14
PAUSE 500
LOW 14
PAUSE 500
NEXT
DEBUG " STOP"
STOP 'Stops the program
'
But this one fails to hold an infinite loop and keep the light on??
It blinks and apparantly exits the program without regard to
the endless repeat loop.
I guess sometimes the simplest things don't work! HELP!!!
'
'{$STAMP BS2}
HIGH 14
repeat:
GOTO repeat
Comments
> Running "Basic Stamp v2 Editor".
> DO and LOOP do not work as below??
> The syntax coloring doesn't make DO or LOOP blue as it does HIGH,
> PAUSE and LOW.
> '
> '{$STAMP BS2}
>
> DO
> HIGH 14
> PAUSE 500
> LOW 14
> PAUSE 200
> LOOP
> '
To activate DO-LOOP you have to add:
'{$PBASIC 2.5}
to your program.
You can do it simply clicking in the "2.5" button in the editor or going to:
Directive > PBASIC > Version 2.5
Then try to RUN your program and you'll also see that DO and LOOP will be
recognized as commands an highlighted in blue.
Saludos,
Aristides Alvarez
Education Manager
aalvarez@p...
Parallax, Inc. www.parallax.com
USA