Shop OBEX P1 Docs P2 Docs Learn Events
loop command — Parallax Forums

loop command

nathan hinesnathan hines Posts: 2
edited 2010-11-29 13:44 in BASIC Stamp
I am using "What's a Microcontroller?" book and am having an isse with the "Loop" command not working. I have the BS2 with a 232 to USB adaptor. I can download the comand and execute it and have the LED light up only once. What am I doing wrong? Here is my code.

' {$STAMP BS2}
DEBUG "program running "
DO
HIGH 14
PAUSE 500
LOW 14
PAUSE 500
Loop

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-28 14:23
    You're missing the ' {$PBASIC 2.5} directive. Without that, DO and LOOP are not keywords and look like variables or labels.
  • nathan hinesnathan hines Posts: 2
    edited 2010-11-28 14:32
    Thanks, It works great. I'm sure that I'll have some more stupid qestions as time goes by. I ran through this in school but it has been a few years.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-11-29 13:44
    nathan hines

    I'm sure that I'll have some more stupid questions as time goes by

    Welcome to the Parallax Forum

    These are only stupid questions if You Do Not Learn Anything
    Please keep this in mind Thanks

    Please feel free to ask as many questions as you need to
Sign In or Register to comment.