Shop OBEX P1 Docs P2 Docs Learn Events
rookie question — Parallax Forums

rookie question

ArchiverArchiver Posts: 46,084
edited 2004-04-15 02:23 in General Discussion
Hi,

i am a Newbie in programming BS2 or any Microcontroller.

My Question:

I wan't to sent with my PC a integer to the serial port. (ex. 1)

If the input is correct (ex. 1) a LED switch on.

I try this:
'{$STAMP BS2}
test VAR BYTE

Main:
SERIN 16,16780,[noparse][[/noparse]DEC test]
if test = 1 then turnon
GOTO Main

turnon:
HIGH 0
GOTO Main

but it don't work??

Can anybody help me?

Thanks

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-15 02:23
    On the Yahoo group site, in Files, AlDemo,
    BS2_VBDemo.zip is a simple, complete example
    of how to interface VB with a BS2. Please
    try it.

    --- In basicstamps@yahoogroups.com, "plumpi1009" <gplanincic@p...>
    wrote:
    > Hi,
    >
    > i am a Newbie in programming BS2 or any Microcontroller.
    >
    > My Question:
    >
    > I wan't to sent with my PC a integer to the serial port. (ex. 1)
    >
    > If the input is correct (ex. 1) a LED switch on.
    >
    > I try this:
    >
    > '{$STAMP BS2}
    > test VAR BYTE
    >
    > Main:
    > SERIN 16,16780,[noparse][[/noparse]DEC test]
    > if test = 1 then turnon
    > GOTO Main
    >
    > turnon:
    > HIGH 0
    > GOTO Main
    >
    >
    > but it don't work??
    >
    > Can anybody help me?
    >
    > Thanks
Sign In or Register to comment.