Same problem
Bibliophile6
Posts: 9
I copied it word for word, why do I get the "Expected label" error!?
' {$STAMP BS2}
' What's a Microcontroller - PushbuttonControlledLed.bs2
' Check pushbutton state 10 times per second and blink LED when pressed.
' {PBASIC 2.5}
DO
· DEBUG HOME
· DEBUG ? IN4
· DEBUG ? IN3
IF (IN3 = 1) THEN
··· HIGH 14
··· PAUSE 50
ELSEIF (IN4 =1) THEN
··· HIGH 15
··· PAUSE 50
· ELSE
··· PAUSE 50
· ENDIF
· LOW 14
· LOW 15
· PAUSE 50
LOOP
' {$STAMP BS2}
' What's a Microcontroller - PushbuttonControlledLed.bs2
' Check pushbutton state 10 times per second and blink LED when pressed.
' {PBASIC 2.5}
DO
· DEBUG HOME
· DEBUG ? IN4
· DEBUG ? IN3
IF (IN3 = 1) THEN
··· HIGH 14
··· PAUSE 50
ELSEIF (IN4 =1) THEN
··· HIGH 15
··· PAUSE 50
· ELSE
··· PAUSE 50
· ENDIF
· LOW 14
· LOW 15
· PAUSE 50
LOOP
Comments
' {PBASIC 2.5}
Is incorrect.
it is
' {$PBASIC 2.5}
Always use the BS2 and 2.5 buttons on the toolbar to add these. Without 2.5, you will get a lot of label errors since DO, ELSE and others are not understood to be commands.
Also, please don't start new discussion threads for the same subject.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
However, I·can only get one of the lights to actually work.
I will RElook the schematics again just to be sure I did not mess up somwhere...
http://forums.parallax.com/showthread.php?p=632072
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support