Basic Stamp II Question
wonka
Posts: 12
I have a question that deal with my basic Stamp two. I have a simple program I want to run attach to the letter. The problem that I am having is it will only run threw the program twice or not even that. Then I have to reset it by using the reset button on the board. Also if I edit anytiming to make longer it keeps one of my output always on.
adam
adam
Comments
·· Is that LOW 12 in the second hold routine supposed to be there? You already performed it right above where it says ignitor off.· If IN15 never reaches 1, then you're stuck in that bottom loop.
·· I would try adding a DEBUG statement in there to track where the program is hanging up.· Perhaps use a:
·· Of course, switch could be aliased to your input PIN.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· If it's a 0 you'll be stuck there forever.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· All I'm saying is that, in your code, you are waiting in a loop and if IN15 = 0 then you stay in the loop.· You posted that you wanted to stay in the loop until the input is 0.· But that will keep it in the loop.· So perhaps you mean to change the IN15 line to "IF IN15 = 1 THEN?"· That way it will stay in the loop while the input = 1, but will exit when it's 0, which is what you said you·wanted.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· Once again, in your new code, you're waiting in a loop while the input = 0, and from what you said, your OFF position = 0, so that's probably where you're hanging up.· Did you try using DEBUG to see if you're getting the signals you expect where/when you want?· It's a great troubleshooting tool.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· Click on the HELP icon on the top-right side of the Stamp Editor.· It's a little icon that looks like a purple book with a question mark on it.· When the help file opens, click on PBASIC reference, then DEBUG.· Better yet, go to the Parallax web page, click on books, then scroll down to the "What's A Microcontroller?" text.· Click on it, scroll down to downloads, and download the PDF file.· Read through it before attempting to take on a project like this.· It will help you understand how to program and interface to the BASIC Stamp Microcontroller.
·· Please do not take offense to this, but if you're trying to control a GAS Grill, which it looks like you are, then you really should learn what you're doing before trying to control the gas solenoid and ignitor.· One wrong move and kaboom!· I, personally don't want to take responsibility for telling how to make the program work if you don't understand how the code works.· Please read the recommended text before pursuing this any further.· I'm just thinking of your personal safety!·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 4/22/2005 1:38:31 AM GMT