Shop OBEX P1 Docs P2 Docs Learn Events
How do you get the Stamp to stop running the code? — Parallax Forums

How do you get the Stamp to stop running the code?

GrampsGramps Posts: 117
edited 2010-04-20 23:23 in Learn with BlocklyProp
Must have missed something in the intro.
How do you get the Stamp to stop running the code?
Or clear the memory or something?
Tanks!!!

Comments

  • silverbacksilverback Posts: 40
    edited 2010-04-16 10:32
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' -----[noparse][[/noparse] Program Description ]---------------------------------------------
    ' Clear Chip 
    '
    ' -----[noparse][[/noparse] I/O Definitions ]------------------------------------------------
    '
    ' -----[noparse][[/noparse] Constants ]-------------------------------------------------------
    '
    ' -----[noparse][[/noparse] Program Code ]---------------------------------------------------
    

    Do
      DEBUG "Clear CHIP", CR
    END
    

    
    

    Use a program like this to remove the previous set of instructions

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.
  • GrampsGramps Posts: 117
    edited 2010-04-16 10:44
    Thank you!!!
  • FranklinFranklin Posts: 4,747
    edited 2010-04-17 01:33
    Gramps, most of the time you don't care what is in the stamp after you're done with the program because when you load the next program it erases the stamp anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • GrampsGramps Posts: 117
    edited 2010-04-17 01:37
    i know but when i set the servo to crashing into something, i wanted to erase it fast!
  • FranklinFranklin Posts: 4,747
    edited 2010-04-17 04:10
    Not sure I understand that but you could always turn off the power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • GrampsGramps Posts: 117
    edited 2010-04-17 04:12
    Ya, but when the power is turned back on, the code is still there.
  • FranklinFranklin Posts: 4,747
    edited 2010-04-17 04:16
    Not if you fix the code and download your next try. You still have to turn it on to download silverback's code. also depending on the board you have the stamp connected to if you only set the switch to position 1 it will not power the servos.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • GrampsGramps Posts: 117
    edited 2010-04-17 04:18
    i have Homework board but servo switch is a good idea.
  • SandhuamarinderSandhuamarinder Posts: 85
    edited 2010-04-17 05:34
    Use END in the end of program at the place of using GOTO MAIN.

    This will also help

    And there is no way out to stop your stamp to stop reading code which is already there. So just power it off. Or hold reset BUTTON till the time u power it off.

    Hope it will help u.

    Use pause between the loops so u know where it is before something really wrong happens.

    or Always keep another program open which doesnt do any thing just run that or press ctrl + R

    I am just student. I maybe wrong.
  • GrampsGramps Posts: 117
    edited 2010-04-20 23:23
    Sandhuamarinder, thanks for your ideas. I think the best fix is to have a kill switch on the servo......
Sign In or Register to comment.