Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing a BS2-sx with a garage door opener — Parallax Forums

Interfacing a BS2-sx with a garage door opener

ArchiverArchiver Posts: 46,084
edited 2002-02-06 21:39 in General Discussion
This will cycle through all possible switch positions, activating the
send output for 25 msec at each. Possible problem: without some
feedback, the Stamp won't know when success occurs and will keep on
working up through the FOR-NEXT loop, so you won't know which
combination was the correct one.

combo VAR WORD

OUTS = 0
DIRS = $1FFF

FOR combo = 0 TO $FFF
OUT12 = 1
PAUSE 25
OUT12 = 0
NEXT


Regards,

Steve



nz_liam wrote:

> I want to interface a BS2-sx with a garage door opener. The garage
> door opener has a 12 pin dip switch for selecting a code...

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-02-06 21:39
    Sorry, still working on my first cup of coffee:

    OUTS = 0
    DIRS = $1FFF

    FOR OUTS = 0 TO $FFF
    OUT12 = 1
    PAUSE 25
    OUT12 = 0
    NEXT

    That looks better.

    Steve

    On 7 Feb 02 at 5:35, S Parkis wrote:

    > This will cycle through all possible switch positions, activating
    > the send output for 25 msec at each. Possible problem: without some
    > feedback, the Stamp won't know when success occurs and will keep on
    > working up through the FOR-NEXT loop, so you won't know which
    > combination was the correct one.
    >
    > combo VAR WORD
    >
    > OUTS = 0
    > DIRS = $1FFF
    >
    > FOR combo = 0 TO $FFF
    > OUT12 = 1
    > PAUSE 25
    > OUT12 = 0
    > NEXT
    >
    >
    > Regards,
    >
    > Steve
    >
    >
    >
    > nz_liam wrote:
    >
    > > I want to interface a BS2-sx with a garage door opener. The garage
    > > door opener has a 12 pin dip switch for selecting a code...
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
Sign In or Register to comment.