- Name:
- reset
- Syntax:
-
RESET
- Description:
-
Force a chip reset. This is the software equivalent of pressing the external reset switch or removing/reconnecting power. The reset command is the software equivalent of pressing the external reset switch (if present). The program is reset to the first line and all variables, stacks etc are reset.
Reset a program
Execute a program then reset the PICAXE so the program starts again
- Code Example:
-
main: let b2 = 15 ; set b2 value pause 2000 ; wait for 2 seconds gosub flsh ; call sub-procedure let b2 = 5 ; set b2 value pause 2000 ; wait for 2 seconds reset ; start again
Copy Code Submit an Example
Submit Your Own Code!
You must be logged in to submit code examples. Login now.