jupyter_micropython_kernel icon indicating copy to clipboard operation
jupyter_micropython_kernel copied to clipboard

Viewing/editing files on a device

Open chrissyast opened this issue 5 years ago • 3 comments

Sorry if this is the wrong place for this, but I'm getting confused about what the intention of Jupyter is.

I can connect to my ESP32, and run any code successfully in the cell and see a response on the device, but I can't see or edit any of the files that are on the device. Is Jupyter intended only as a playground for testing out bits of code? Can't actually make any permanent changes on the device?

chrissyast avatar Apr 13 '19 15:04 chrissyast

There's a set of magic commands, which you can see using %lsmagic

The one you probably want is this one:

%sendtofile [--append] [--mkdir] [--binary] [--execute]
                   [--source [SOURCE]] [--quiet] [--QUIET]
                   [destinationfilename]
    send cell contents or file/direcectory to the device

My workflow is usually to hack up the different functions I need, gradually developing them (you can use esc-I-I to control-C and interrupt loops. Then when I have something working I put "%sendtofile main.py" at the start of a cell and it's good to go.

Here's an example: https://github.com/goatchurchprime/jupyter_micropython_developer_notebooks/blob/master/projects/esp8266buttontoUDP.ipynb

goatchurchprime avatar Apr 15 '19 16:04 goatchurchprime

Thanks @goatchurchprime ! Are you the Julian at DoES Liverpool?

chrissyast avatar Apr 15 '19 18:04 chrissyast

yes. I suppose I should update my profile then.

goatchurchprime avatar Apr 16 '19 12:04 goatchurchprime