Skip to content

Storing usercode in repl-accessible file #38

@jakeg

Description

@jakeg

Running .ls shows no files, and .pwd shows we're in root. Where is the usercode which is sent to the Pi Pico via kaluma flash -w stored?

If putting MicroPython on the Pi Pico, the usercode is stored in main.py in the root. It would be very useful if Kaluma did something similar (suggest index.js instead). The .ls command etc would then make more sense.

I'm asking because I'm thinking of flashing files to Kaluma in a similar way to how it works with MicroPython, which is much quicker!

Try https://www.mathsuniverse.com/pico for Kaluma JS and https://www.mathsuniverse.com/pico/python.html for Python. Try flashing a file with both and note how much quicker it is with Python.

With Kaluma JS, the file is sent using a ymodem implementation. With MicroPython, raw repl mode is entered and the code is just pasted in, then saved to main.py by MicroPython itself, then a command is then sent to soft-reset.

So I'm thinking if the usercode is stored in the repl-accessible folder as index.js then we could use a similar method, using fs = require('fs') etc. The ymodem implementation could then be deprecated. My guess is that this would be much faster as well, like it is with MicroPython.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions