question
Archiver
Posts: 46,084
It will stay in the first loop forever!
Don
Original Message
From: "DUNCANLA" <Duncanla@c...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, June 11, 2002 11:51 AM
Subject: [noparse][[/noparse]basicstamps] question
> I am new to stamps and i was had a quick question.
> Is the Stamp capable of doing programs like this:?
>
> Loop1:
> High 1
> Low 2
> High 3
> Goto Loop1
>
> Loop 2:
> Low 1
> High 2
> Low 3
> Goto Loop2
>
> Or will it get locked up in the first one and just do that one forever or
can the stamp do both at the same time?
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> 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/
>
>
>
Don
Original Message
From: "DUNCANLA" <Duncanla@c...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, June 11, 2002 11:51 AM
Subject: [noparse][[/noparse]basicstamps] question
> I am new to stamps and i was had a quick question.
> Is the Stamp capable of doing programs like this:?
>
> Loop1:
> High 1
> Low 2
> High 3
> Goto Loop1
>
> Loop 2:
> Low 1
> High 2
> Low 3
> Goto Loop2
>
> Or will it get locked up in the first one and just do that one forever or
can the stamp do both at the same time?
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> 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/
>
>
>
Comments
have been set the first time, you won't see any changes.
Are you trying pulse the outputs? If so, you can use the PULSOUT command.
Something like this:
Setup:
LOW 1
HIGH 2
LOW 3
Loop:
PULSOUT 1, 5
PULSOUT 2, 5
PULSOUT 3, 5
GOTO Loop
The PULSOUT command will pulse the given pin to the opposite of its initial
state. The second parameter of the command is time, expressed in 2
microsecond units (for a BS2).
-- Jon Williams
-- Parallax
In a message dated 6/11/02 10:55:50 AM Central Daylight Time,
Duncanla@c... writes:
> I am new to stamps and i was had a quick question.
> Is the Stamp capable of doing programs like this:?
>
> Loop1:
> High 1
> Low 2
> High 3
> Goto Loop1
>
> Loop 2:
> Low 1
> High 2
> Low 3
> Goto Loop2
>
> Or will it get locked up in the first one and just do that one forever or
>
[noparse][[/noparse]Non-text portions of this message have been removed]
BASIC Stamp (or any clone, for that matter). My best advice would be to put
that code in the "top" of your program, then divide the rest of the program
into discrete tasks. You can then run the pulsing block in between every
task.
Here's the general idea. You'll need to read a bit of the BASIC Stamp
documentation to fully utilize this:
Setup:
LOW 1
HIGH 2
LOW 3
Main:
PULSOUT 1, 5
PUSLOUT 2, 5
PUSLOUT 3, 5
BRANCH task, [noparse][[/noparse]Task0, Task1, Task2]
Task0:
' do something
task = 1
GOTO Main
Task1:
' do something
task = 2
GOTO Main
Task2:
' do something
task = 0
GOTO Main
-- Jon Williams
-- Parallax
In a message dated 6/11/02 11:20:57 AM Central Daylight Time,
Duncanla@c... writes:
> Thanks, i was just giving an example with the High and Low Pins, but your
> pulsout example brings me another question:
> How would you continue with the rest of your program with that loop in
> there?
>
[noparse][[/noparse]Non-text portions of this message have been removed]
Is the Stamp capable of doing programs like this:?
Loop1:
High 1
Low 2
High 3
Goto Loop1
Loop 2:
Low 1
High 2
Low 3
Goto Loop2
Or will it get locked up in the first one and just do that one forever or can
the stamp do both at the same time?
[noparse][[/noparse]Non-text portions of this message have been removed]
pulsout example brings me another question:
How would you continue with the rest of your program with that loop in there?
[noparse][[/noparse]Non-text portions of this message have been removed]