Ctrl+D: Reboot the MicroPython REPL
Use this command to reboot the REPL and clear any variable and function definitions.
- Access the MicroPython environment.
- At the MicroPython >>> prompt, type a = "test", then press Enter. This statement assigns the value "test" to the variable "a".
- At the MicroPython >>> prompt, type a, then press Enter. The value assigned to the variable displays.
- Press Ctrl+D to reboot the REPL. The phrase "soft reboot" followed by the MicroPython banner prints.
- At the MicroPython >>> prompt, type the variable "a" (no quotes) and press Enter. Since the memory was wiped, the variable is not found and the error NameError: name not defined prints in the output.
MicroPython v1.9.3-999-g00000000 on 2018-01-01; XBee Module with EFX32 Type "help()" for more information. >>> a = 'test' >>> a 'test' >>> soft reboot MicroPython v1.9.3-999-g00000000 on 2018-01-01; XBee Module with EFX32 Type "help()" for more information. >>> a Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name not defined