1.7 KiB
1.7 KiB
MicroPython
A pared down version of Python designed for programming Microcontrollers like the ESP8266.
REPL
The 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 withCtrl+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
Tools
- mpremote
- MicroPython remote control. Provides REPL access, editing, and file system mounting.
Questions
What files does the MicroPython firmware expect to find?
-
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 afterboot.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.