PDA

View Full Version : BS2 editor doesn't like PIN Keyword



McRat
11-22-2006, 08:56 AM
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):



' {$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


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:



' {$STAMP BS2}
······· AlarmLed· CON···· 0······ '
······· FlashTm·· CON···· 500····· '
······· Main:
········· HIGH AlarmLed
········· PAUSE FlashTm
········· LOW AlarmLed
········· PAUSE FlashTm
········· GOTO Main


Is there a specific reason to use PIN, and if so, what am I doing wrong?

Bean
11-22-2006, 09:14 AM
You need to use PBASIC 2.5.
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 (http://www.hc4led.com)

Low power SD Data Logger www.sddatalogger.com (http://www.sddatalogger.com)
SX-Video Display Modules www.sxvm.com (http://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
·

McRat
11-22-2006, 09:15 AM
Thanks! I'll give that a try.