missing label
Robert.IT
Posts: 13
When I go to run and check the syntax, it highlights the word CON in my code and says label missing. How can I Fix this?
Comments
trying to do.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
' {$STAMP BS1}
' Whiskers.bs2 - Simple program for detecting objects
' with a Basic Stamp II in a Boe-Bot
' Constant and Variable Definitions
'
servo_left con 15 ' left servo on p15
servo_right con 14 ' right servo on p15
whisker left var in10 ' left whisker on P10
whiskert_right var in5 ' right whisker on P5
counter var word ' loop counter variable
' main Program
'
check whiskers: ' check each whisker
IF whicker_left = 0 AND whisker_right = 0 THEN back
IF whisker_left = 0 THEN right
IF whisker right = 0 THEN left
drive servos: ' drive forware
PULSOUT servo_left,850
PULSOUT servo right,650
PULSOUT 10
GOTO check_whiskers
back: ' backward if both switches close
FOR counter = 0 TO 100
PULSOUT servo_left,650
PULSOUT servo_right,850
NEXT
RETURN
GOTO drive servos
left: ' turn left if right switch closes
GOSUB back
FOR counter = 0 TO 100
PULSOUT servo left,650
PULSOUT servo_right,650
NEXT
GOTO drive servos
right: ' turn right if left switch closes
GOSUB back
FOR coutner = 0 TO 100
PULSOUT servo left,850
PULSOUT servo_right,850
NEXT
GOTO drive_servos
'
' {$STAMP BS2} -- this replaces current definition
' {$PBASIC 2.5} -- this allows PIN and other programming conveniences (see help file)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office