Wam Experiment troubles
Archiver
Posts: 46,084
Mark-
As others note, you need the right editor to make that WAM program
work using the DO...LOOP, IF-THEN...ELSE...ENDIF constructs.
Alternatively, you can work closer to the Stamp's basic nature with
the following program with any version of the editor. If you're
trying to learn about your Stamp as much as general programming
concepts, it might be worth your time to figure out why both programs
do (almost) the same thing.
Might also be instructive to consider what situation would cause the
two programs to produce different outputs.
'($STAMP BS2)
again:
DIR14 = IN3
DEBUG ? DIR14
OUT14 = 1
PAUSE 50
OUT14 = 0
PAUSE 50
GOTO again
Regards,
Steve
On 11 Mar 04 at 11:34, MARK DEVINE wrote:
> Hi everyone,
> I am using the 2.0 manual and am trying to work on chapter 3,
> activity 3, on page 80-83. I have BS2's and the program I am
> running is right out of the book: '($STAMP BS2)
>
> DO
> DEBUG ? IN3
>
> IF (IN3 = 1) THEN
> HIGH 14
> PAUSE 50
> LOW 14
> PAUSE 50
>
> ELSE
> PAUSE 100
>
> ENDIF
>
> LOOP
As others note, you need the right editor to make that WAM program
work using the DO...LOOP, IF-THEN...ELSE...ENDIF constructs.
Alternatively, you can work closer to the Stamp's basic nature with
the following program with any version of the editor. If you're
trying to learn about your Stamp as much as general programming
concepts, it might be worth your time to figure out why both programs
do (almost) the same thing.
Might also be instructive to consider what situation would cause the
two programs to produce different outputs.
'($STAMP BS2)
again:
DIR14 = IN3
DEBUG ? DIR14
OUT14 = 1
PAUSE 50
OUT14 = 0
PAUSE 50
GOTO again
Regards,
Steve
On 11 Mar 04 at 11:34, MARK DEVINE wrote:
> Hi everyone,
> I am using the 2.0 manual and am trying to work on chapter 3,
> activity 3, on page 80-83. I have BS2's and the program I am
> running is right out of the book: '($STAMP BS2)
>
> DO
> DEBUG ? IN3
>
> IF (IN3 = 1) THEN
> HIGH 14
> PAUSE 50
> LOW 14
> PAUSE 50
>
> ELSE
> PAUSE 100
>
> ENDIF
>
> LOOP
Comments
I am using the 2.0 manual and am trying to work on chapter 3, activity
3, on page 80-83. I have BS2's and the program I am running is right
out of the book:
'($STAMP BS2)
DO
DEBUG ? IN3
IF (IN3 = 1) THEN
HIGH 14
PAUSE 50
LOW 14
PAUSE 50
ELSE
PAUSE 100
ENDIF
LOOP
I can not find Else as a command in the help file. I am also using
version 1.32 of the software. Is this my problem? Thanks in advance
for your help
Mark
explanation there.
Good experimenting...
Original Message
From: MARK DEVINE [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=EzjH9kgXvFbPK0OBiwlD62mUxghZ74AvYzDFI7KlPxQyjRUpj3rAHRTaZGKuq_SFvBpfk2VSKMv-AO4]mdevine@s...[/url
Sent: Wednesday, March 10, 2004 9:34 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Wam Experiment troubles
Hi everyone,
I am using the 2.0 manual and am trying to work on chapter 3, activity
3, on page 80-83. I have BS2's and the program I am running is right
out of the book:
'($STAMP BS2)
DO
DEBUG ? IN3
IF (IN3 = 1) THEN
HIGH 14
PAUSE 50
LOW 14
PAUSE 50
ELSE
PAUSE 100
ENDIF
LOOP
I can not find Else as a command in the help file. I am also using
version 1.32 of the software. Is this my problem? Thanks in advance
for your help
Mark
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.
Yahoo! Groups Links
That's exaclty what's holding you up. Visit the link I posted below
and download PBasic 2.5 which features new commands like
IF...THEN...ELSE and more. You can use the help provided with the
new software to look up proper usage of the ELSE statement!
http://www.parallax.com/html_pages/downloads/software/software_basic_
stamp.asp
Good Luck,
Lu
--- In basicstamps@yahoogroups.com, "MARK DEVINE" <mdevine@s...>
wrote:
> Hi everyone,
> I am using the 2.0 manual and am trying to work on chapter 3,
activity
> 3, on page 80-83. I have BS2's and the program I am running is
right
> out of the book:
> '($STAMP BS2)
>
> DO
> DEBUG ? IN3
>
> IF (IN3 = 1) THEN
> HIGH 14
> PAUSE 50
> LOW 14
> PAUSE 50
>
> ELSE
> PAUSE 100
>
> ENDIF
>
> LOOP
>
> I can not find Else as a command in the help file. I am also using
> version 1.32 of the software. Is this my problem? Thanks in
advance
> for your help
> Mark
2.5 features added to your program. Add this line
' {$PBASIC 2.5}
to enable IF-THEN-ELSE. If that doesn't work, you'll need to update to
the latest version of the compiler (version 2.1).
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: MARK DEVINE [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pEGODw1US6aFgUMniFMbYMOA2XZzLmK2-HMHWE8afvTHuMSZH_hw8vJKGW_Rsmhy2M1dL-WmGlGRYA]mdevine@s...[/url
Sent: Wednesday, March 10, 2004 9:34 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Wam Experiment troubles
Hi everyone,
I am using the 2.0 manual and am trying to work on chapter 3, activity
3, on page 80-83. I have BS2's and the program I am running is right
out of the book: '($STAMP BS2)
DO
DEBUG ? IN3
IF (IN3 = 1) THEN
HIGH 14
PAUSE 50
LOW 14
PAUSE 50
ELSE
PAUSE 100
ENDIF
LOOP
I can not find Else as a command in the help file. I am also using
version 1.32 of the software. Is this my problem? Thanks in advance
for your help Mark
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.
Yahoo! Groups Links
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
keep up with new applications and hardware. The Stamps are excellent
but sometimes unforgiving when you are giving a program to 20 kids and
it doesn't work. This group is awesome and I hope someday I can repay
by replying to a question.
Mark
Original Message
From: S Parkis [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=PtbyZYIEjG6uPabLoHK_wecRwuHA9ou98CFCkHYP_q6vQiQ-wyDyKcUAjmkFE1_WNvh9r7czy0eT8eDNgxQ]parkiss@e...[/url
Sent: Thursday, March 11, 2004 7:23 AM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Wam Experiment troubles
Mark-
As others note, you need the right editor to make that WAM program
work using the DO...LOOP, IF-THEN...ELSE...ENDIF constructs.
Alternatively, you can work closer to the Stamp's basic nature with
the following program with any version of the editor. If you're
trying to learn about your Stamp as much as general programming
concepts, it might be worth your time to figure out why both programs
do (almost) the same thing.
Might also be instructive to consider what situation would cause the
two programs to produce different outputs.
'($STAMP BS2)
again:
DIR14 = IN3
DEBUG ? DIR14
OUT14 = 1
PAUSE 50
OUT14 = 0
PAUSE 50
GOTO again
Regards,
Steve
On 11 Mar 04 at 11:34, MARK DEVINE wrote:
> Hi everyone,
> I am using the 2.0 manual and am trying to work on chapter 3,
> activity 3, on page 80-83. I have BS2's and the program I am
> running is right out of the book: '($STAMP BS2)
>
> DO
> DEBUG ? IN3
>
> IF (IN3 = 1) THEN
> HIGH 14
> PAUSE 50
> LOW 14
> PAUSE 50
>
> ELSE
> PAUSE 100
>
> ENDIF
>
> LOOP
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.
Yahoo! Groups Links