BS2 editor doesn't like PIN Keyword
McRat
Posts: 13
Greetings, first stupid question time~!!
I have the Pro Dev Board with a BS2 in it.· I could not get the USB driver to work (not unusual for this computer), so I'm interfaced on the RS232.· I can communicate with board now.
I am running the BS Editor 2.2.6 and typed in the first practice project (StampWorks EXP1, pg26):
[noparse][[/noparse]code]
' {$STAMP BS2}
'
set var for pin0
······· AlarmLed··PIN···· 0······ '
'
set delay const
·······
······· FlashTm·· CON···· 500····· '
·······
Main:
········· HIGH AlarmLed
········· PAUSE FlashTm
········· LOW AlarmLed
········· PAUSE FlashTm
········· GOTO Main
[noparse][[/noparse]/code]
However this will not pass syntax checking.· It chokes on the PIN keyword, expecting a : symbol.· The example code does not use one, nor will adding one stop the error.
If I change the PIN to CON, the experiment works great, and I can control the LED:
[noparse][[/noparse]CODE]
' {$STAMP BS2}
······· AlarmLed· CON···· 0······ '
······· FlashTm·· CON···· 500····· '
······· Main:
········· HIGH AlarmLed
········· PAUSE FlashTm
········· LOW AlarmLed
········· PAUSE FlashTm
········· GOTO Main
[noparse][[/noparse]/code]
Is there a specific reason to use PIN, and if so, what am I doing wrong?
I have the Pro Dev Board with a BS2 in it.· I could not get the USB driver to work (not unusual for this computer), so I'm interfaced on the RS232.· I can communicate with board now.
I am running the BS Editor 2.2.6 and typed in the first practice project (StampWorks EXP1, pg26):
[noparse][[/noparse]code]
' {$STAMP BS2}
'
set var for pin0
······· AlarmLed··PIN···· 0······ '
'
set delay const
·······
······· FlashTm·· CON···· 500····· '
·······
Main:
········· HIGH AlarmLed
········· PAUSE FlashTm
········· LOW AlarmLed
········· PAUSE FlashTm
········· GOTO Main
[noparse][[/noparse]/code]
However this will not pass syntax checking.· It chokes on the PIN keyword, expecting a : symbol.· The example code does not use one, nor will adding one stop the error.
If I change the PIN to CON, the experiment works great, and I can control the LED:
[noparse][[/noparse]CODE]
' {$STAMP BS2}
······· AlarmLed· CON···· 0······ '
······· FlashTm·· CON···· 500····· '
······· Main:
········· HIGH AlarmLed
········· PAUSE FlashTm
········· LOW AlarmLed
········· PAUSE FlashTm
········· GOTO Main
[noparse][[/noparse]/code]
Is there a specific reason to use PIN, and if so, what am I doing wrong?
Comments
Click on the icon that looks like a gear with "2.5" in front of it.
Or add this to the top of your program
' {$PBASIC 2.5}
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
·