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.

Applies To:
08M2, 14M2, 18M2, 20M2, 20X2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:
    Share:
    Print:

    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.