Shop OBEX P1 Docs P2 Docs Learn Events
old stamp1, VERY basic program attempt — Parallax Forums

old stamp1, VERY basic program attempt

ArchiverArchiver Posts: 46,084
edited 2001-11-11 17:47 in General Discussion
I have an old basic one, just trying to get it to simply do the
following:

when power is applied to one input, i want it to start a CD player
with a push button type start, when power is turned off I want to
push the stop button on the cd player. Here is what I have, what am
I doing wrong?

input 0
output 6
output 7

CHKON: if pin0=1 then START
goto CHKON

START: high 6
pause 1000
low 6

CHKOFF: if pin0=0 then STOP
goto CHKOFF

STOP: high 7
pause 1000
low 7

seems simple, but it doesnt seem to run, i get no change in state on
pins 6 and 7 (connected to LED via 200 ohm resistor).

any ideas would be nice, thanks

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 17:47
    pin 0 has to be high or low to start with ,use a resistor to pull the
    input either high or low
    Put your Start subroutine into a loop so that the next change in state
    will exit the loop
    and into your chkoff routine

    On Sat, 10 Nov 2001 21:06:22 -0000 daronwilson@y... writes:
    >
    > I have an old basic one, just trying to get it to simply do the
    > following:
    >
    > when power is applied to one input, i want it to start a CD player
    > with a push button type start, when power is turned off I want to
    > push the stop button on the cd player. Here is what I have, what am
    >
    > I doing wrong?
    >
    > input 0
    > output 6
    > output 7
    >
    > CHKON: if pin0=1 then START
    > goto CHKON
    >
    > START: high 6
    > pause 1000
    > low 6
    >
    > CHKOFF: if pin0=0 then STOP
    > goto CHKOFF
    >
    > STOP: high 7
    > pause 1000
    > low 7
    >
    > seems simple, but it doesnt seem to run, i get no change in state on
    >
    > pins 6 and 7 (connected to LED via 200 ohm resistor).
    >
    > any ideas would be nice, thanks
    >
    >
    > 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.