I've recently bought a NodeMCU board and flashed Micropython in it.
I've read about the boot.py
and main.py
scripts, but I can't understand how to access them.
I have succesfully connected to the Python REPL with the screen
command and everything works fine.
Is there a way to mount it as an external drive on Mac OS X? Because I haven't found a way till now.
Thanks in advance!

- 2,928
- 11
- 25

- 4,887
- 2
- 24
- 53
3 Answers
you can enable the webrepl and upload via that
I've found this one package very helpful to upload vi the serial.
pip install mpfshell
python -m mp.mpfshell
> open COM3
> put main.py
micropython is cool...

- 408
- 5
- 18
-
Nice. Meanwhile I've found `ampy` which allows you to do the same. I was wanderind if there was a way to open it as a "normal" device, as I've read that mac os should do that :( – magicleon94 Sep 07 '17 at 17:48
-
Yep! I needed only the module, but the whole board costed me a couple of euros more, so that was worth indeed lol – magicleon94 Sep 07 '17 at 17:51
-
I don't think there's a driver to mount it on a pc ( PyBoard has one) – Fruch Sep 07 '17 at 17:52
-
well, I don't think so either but I remember to have read "Mac OS X should see is like a normal mounted device", even though I can't find the page where I read it. I'll leave this question open, hoping I was right lol – magicleon94 Sep 07 '17 at 17:54
Due to some questions I had about the NodeMcu and running Python on it, I just set up a pretty end-to-end documentation python2nodemcu on GitHub.
Viewing, downloading, uploading or listing files of the MicroPython filesystem has its own section there.
It utilizes Ampy, a Python library to connect to the MicroPython-based board via its serial connection. For listing all files for example, simply run python3 ampy/cli.py --port /dev/tty.{device-file} --baud 115200 ls
.

- 199
- 3
- 23
The mpy-utils software package contains a tool called mpy-fuse
that allows you to mount a MicroPython device from Linux or MacOS using FUSE. I found this tool through this video that describes how to set it up and shows how it looks like in action.

- 2,928
- 11
- 25