I am using the What's a Microcontroller version 2.1.· I tried the Help on the program and it did not find anything under DO ... While statement.· It actually froze the program.· Is there any where else I can research this statement.
You can access the "Help" file by clicking on "Start" in Windows and then click on "Programs" and then click on the "Parallax" folder and access the "Help" file from there.
ok had to look through the syntax book
do while/until
do
while "run loop if condition are true"
until "terminate loop if condition are true"
loop
are condition true or false ?
you can always clear the code by running an erase program to the stamp
if the stamp is locking up ?
On page 91, there is an example of a DO...LOOP UNTIL code block.
DO
LOOP UNTIL condition
It keeps repeating –until- you have pressed the button (IN3 = 1).
The exercise is telling you to modify the loop so that it looks like this:
DO WHILE condition
LOOP
Instead of repeating the loop –until- a particular condition happens, the loop should keep repeating –while- a condition is true (while the button is not pressed). So, what's the value of IN3 when the button is pressed. What's the value of IN3 when the button is not pressed? What condition do you want to put in there?
It’s good that you’re looking things up in the PBASIC Syntax Guide. You’ll get better at understanding the syntax descriptions with practice. You can also download the BASIC Stamp Manual (or open it from your CD like in Chapter 1). In many cases, there will be more explanations and example programs there.
Comments
·· Please specify the book you are referring to.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
' {$PBASIC 2.5}
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
·
do while/until
do
while "run loop if condition are true"
until "terminate loop if condition are true"
loop
are condition true or false ?
you can always clear the code by running an erase program to the stamp
if the stamp is locking up ?
DO
LOOP UNTIL condition
It keeps repeating –until- you have pressed the button (IN3 = 1).
The exercise is telling you to modify the loop so that it looks like this:
DO WHILE condition
LOOP
Instead of repeating the loop –until- a particular condition happens, the loop should keep repeating –while- a condition is true (while the button is not pressed). So, what's the value of IN3 when the button is pressed. What's the value of IN3 when the button is not pressed? What condition do you want to put in there?
It’s good that you’re looking things up in the PBASIC Syntax Guide. You’ll get better at understanding the syntax descriptions with practice. You can also download the BASIC Stamp Manual (or open it from your CD like in Chapter 1). In many cases, there will be more explanations and example programs there.