72916db2cdd0f53e197d4857fb29a5d7ff1c81fc — nora 1 year, 4 months ago 7f5e8b5
Add mpremote module
1 files changed, 44 insertions(+), 0 deletions(-)

M README.md => README.md +44 -0
@@ 25,6 25,50 @@ On Arch Linux you need to be in `uucp` group:

## Run Python code

### [mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html)

Install `mpremote` module.

Access REPL on the device:

    mpremote a0
    mpremote connect /dev/ttyACM0 repl

Run a command on the device:

    mpremote eval 1+1
    mpremote exec "print(1+1)"

Run a script on the device:

    mpremote run app.py

Run a filesystem operation on the device:

    # ls, cat, touch, cp, rm, mkdir, rmdir
    mpremote cp main.py :
    mpremote ls

Show memory usage:

    mpremote df
    mpremote exec "import micropython; micropython.mem_info()"

Mount the local directory on the device:

    mpremote mount .
    mpremote umount

Reset the device:

    mpremote soft-reset
    mpremote reset

Install packages from [micropython-lib](https://github.com/micropython/micropython-lib):

    mpremote mip install onewire ds18x20

### [pyboard.py](https://docs.micropython.org/en/latest/reference/pyboard.py.html)

Download [pyboard.py](https://github.com/micropython/micropython/blob/master/tools/pyboard.py) and install `pyserial` module.