Shop OBEX P1 Docs P2 Docs Learn Events
Reset Command Available? — Parallax Forums

Reset Command Available?

JBWolfJBWolf Posts: 405
edited 2011-11-16 06:53 in Propeller 1
Hello,
I was wondering if there is a spin command to reset the propeller? I'd like to accomplish same effect as pushing the reset button or powercycling.
I'm hoping for an easy way to make my program restart if a combination of input buttons are held down for a period of time.

Thanx,
J

Comments

  • JBWolfJBWolf Posts: 405
    edited 2011-11-16 02:52
    Ah, just found the REBOOT command.
    Looks like syntax is used just like QUIT, by itself correct?

    for example:
    if ina[button] == 1
    reboot
  • JonnyMacJonnyMac Posts: 9,198
    edited 2011-11-16 06:53
    Yes, all by itself -- I use it after having the Propeller reload new firmware from an SD card.

    That said, your code above is a tad dangerous; a bit of noise on the board could cause the input to read as "1" and reset the program when you don't mean it to. You might want to add a simple debouce loop.
Sign In or Register to comment.