This commit is contained in:
Correl Roush 2023-03-21 01:04:20 -04:00
parent 9b869ae6de
commit d648562683

View file

@ -5,8 +5,20 @@
A pared down version of [[id:cda9c620-fec5-4549-b979-22fc06819d77][Python]] designed for programming [[id:c412e81c-9271-4224-89b7-315a4b89968e][Microcontrollers]] like
the [[id:d97fde4a-0e91-40f9-ac57-d0cd67295d14][ESP8266]].
* REPL
The [[https://docs.micropython.org/en/latest/reference/repl.html][MicroPython REPL]] is available through a device's serial interface. It
functions in two modes:
- Friendly :: A user-friendly REPL with indentation and tab completion.
Evaluation is echoed back. Indentation may be temporarily disabled toggling
"paste mode" with =Ctrl+E=. Execution may be interrupted with =Ctrl+C=.
- Raw :: A machine-friendly REPL for tools to provide raw code to be executed.
Essentially functions similar to the friendly REPL in paste mode, without
output echoing. /Note: Automatic startup/soft-reset execution of =main.py= is
disabled while the REPL is in raw mode./
* Documentation
- [[https://docs.micropython.org/en/latest/index.html][Official documentation]]
* Tools
- [[https://docs.micropython.org/en/latest/reference/mpremote.html#][mpremote]] :: MicroPython remote control. Provides REPL access, editing, and
file system mounting.
@ -15,3 +27,5 @@ the [[id:d97fde4a-0e91-40f9-ac57-d0cd67295d14][ESP8266]].
- =boot.py= :: Performs initialization when the device is powered up.
- =main.py= :: If present (and no errors occurred while executing =boot.py=), it
is executed after =boot.py= and functions as an application code entry point.
/Execution of this file is skipped if the REPL is not in "friendly" mode, e.g.
if a tool has switched to the "raw" REPL./