Shop OBEX P1 Docs P2 Docs Learn Events
BS2 editor doesn't like PIN Keyword — Parallax Forums

BS2 editor doesn't like PIN Keyword

McRatMcRat Posts: 13
edited 2006-11-22 02:15 in BASIC Stamp
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?

Comments

  • BeanBean Posts: 8,129
    edited 2006-11-22 02:14
    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

    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
    ·
  • McRatMcRat Posts: 13
    edited 2006-11-22 02:15
    Thanks! I'll give that a try.
Sign In or Register to comment.