Shop OBEX P1 Docs P2 Docs Learn Events
Do..Loop issue — Parallax Forums

Do..Loop issue

sallym01sallym01 Posts: 2
edited 2014-07-20 20:48 in BASIC Stamp
My Basic Stamp 2 doesn't seem to process the loop command when I write DO...LOOP. The program only runs once. I saw in the book on p. 34 that this may indicate that I have a computer with a non-standard serial port design. Even when the programming cable is unplugged and I press reset, the program still doesn't loop. Any suggestions?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-28 18:12
    Sally,

    Welcome to the Parallax forum! Please post your entire program between [noparse]
    and
    
    [/noparse] tags so we're better able to help you.

    -Phil
  • sallym01sallym01 Posts: 2
    edited 2014-06-28 18:15
    Actually, I finally figured it out right after posting. I made this typo:

    ' {$stamp bs2} (should have been all caps)

    Thanks!
  • davejamesdavejames Posts: 4,047
    edited 2014-07-01 22:30
    Hi sally01 - ditto on the welcome.

    Also be aware that DO...LOOP is valid for PBASIC 2.5.

    So, at the top of your code, there should be the following:
    [FONT=courier new]' {$STAMP BS2} 
    ' {$PBASIC 2.5}[/FONT]
    
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-07-07 10:25
    I recommend using the Toolbar Icons to insert the Stamp and PBASIC version directives to avoid spelling issues. I start every program by clicking the two icons I need.
  • ajwardajward Posts: 1,130
    edited 2014-07-07 19:01
    I recommend using the Toolbar Icons to insert the Stamp and PBASIC version directives to avoid spelling issues. I start every program by clicking the two icons I need.

    I do the same thing, but... sadly because I'm lazy! ;-)

    @
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-07-07 20:18
    I do it that way all the time, since I suffer from dgiitla dsylxeia when I tpye.

    -Phil
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-07-08 08:15
    I have had some support calls where someone is not familiar with the Toolbar, so here is a graphic of the Toolbar with red arrows pointed at the two most common buttons to click for every program. If you're using a different model BASIC Stamp Module than the stock BS2, select the appropriate one in the red box instead.

    Stamp Directives.jpg
    909 x 204 - 34K
  • trookstrooks Posts: 228
    edited 2014-07-20 20:48
    I do it because my fingers are not as fast and nimble as they once were.

    Even so I still have to double check behind the rodent because sometimes it points and clicks a little off target.
Sign In or Register to comment.