Shop OBEX P1 Docs P2 Docs Learn Events
stop command — Parallax Forums

stop command

DestroyerXDestroyerX Posts: 34
edited 2005-02-22 02:29 in BASIC Stamp
Is there a built in key that can be pressed while I'm running the Basic Stamp Editor v2.1 that will send the STOP command to my BS2 immediately?

Thanks,

Jason

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Unreal tournament 2004 rox

Comments

  • Robert SchwartzRobert Schwartz Posts: 141
    edited 2005-02-21 21:49
    Well, you usually won't be running the editor while running the bs2 program. You can add the END command to your program saying like if a button is pressed, stop the program. STOP is similar to end, but END puts the bs2 into sleep mode.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-02-21 22:07
    If you're testing a program and want to be able to stop it in a hurry if something acts up, the one thing I do is keep multiple programs loaded (Each on their own tab).· The first one is a blank program which has nothing more than:

    Finished:
       GOTO Finished
    

    If I am running a program, and something acts up, I quickly click on that tab then select run, which downloads the new (blank) program and halts whatever was going on before.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --==<{Chris}>==--
  • Ben DamonBen Damon Posts: 42
    edited 2005-02-21 22:33
    Ya i did the same here.· But my main reason was to stop loops with out shuting off the stamp.· Now i know about the command·until.··very useful

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ben Damon


    And may God Bless America!
    ·
  • DestroyerXDestroyerX Posts: 34
    edited 2005-02-21 22:41
    Ok, so I guess there's no key but it still can be done fast.

    I currently just dowload a program with only the STOP command in it to stop everything.

    Thanks for all of your help on my original question everyone.

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Unreal tournament 2004 rox
  • Robert SchwartzRobert Schwartz Posts: 141
    edited 2005-02-22 01:26
    DestroyerX, using the STOP command keeps the bs2 drawing full current. If you are using to completely end the program, you may as well use END< which also puts the bs2 into a low-current draw sleep mode.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-02-22 01:33
    Robert,

    ·· Using end isn't always a good idea.· Many people find out the hard way when their program ends, and their project starts doing whacky things, due to the what happens after and END statement.· Every 2.3 seconds, the OUTPUT pins will switch to INPUT for 18ms.· This can cause often undesireable effects depending on what's connected to the pins.· Just something to bear in mind.· Take care!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --==<{Chris}>==--
  • Robert SchwartzRobert Schwartz Posts: 141
    edited 2005-02-22 02:15
    Thanks Chris. I knew that END had some weird effect, but didn't know what it was. I'll have to take that into consideration.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-02-22 02:29
    Yeah, as I said, it doesn't apply to everyone.· Certainly in some situations low power is a good thing.· But I have watched enough threads where someone had weird stuff happening after their program was complete, and usually it was tracked down to the END statement, or no end at all.· In that case I usually put:

    Finished:
       GOTO Finished
    

    Just something to keep in the back of your mind for in the future when you see such a post...· smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --==<{Chris}>==--
Sign In or Register to comment.