Copying a config file onto the Micro:Bit
Posted: Sat Apr 29, 2017 6:01 pm
I've hunted everywhere for the answer to this question, but I've drawn a complete blank in my searches. How do I copy files in and out of the persistent storage on the Micro:Bit? I've successfully read and written files using the MicroPython code running on the Micro:Bit, but I'm at a loss as to how I might copy such a file on or off the Micro:Bit.
For my initial project, I would like to be able get the Micro:Bit to read a few simple parameters out of a config file held in the persistent storage, but it would also be nice at some point in the future to be able to write logs files to the storage and the copy them out for analysis.
I've tried copying the config files across with the .hex file when the Micro:Bit is flashed, but the files seem to vanish into thin air and files which are created by the Micropython code never show up, so I'm assuming that the storage device which I connect to when I plug the micro:bit into my computer has nothing to do with the persistent storage and only handles the flashing process. Ideally I would like to be able to mount the persistent storage onto my Linux desktop so I can copy files on and off easily, but I'll settle for any simple tool which gives access.
For my initial project, I would like to be able get the Micro:Bit to read a few simple parameters out of a config file held in the persistent storage, but it would also be nice at some point in the future to be able to write logs files to the storage and the copy them out for analysis.
I've tried copying the config files across with the .hex file when the Micro:Bit is flashed, but the files seem to vanish into thin air and files which are created by the Micropython code never show up, so I'm assuming that the storage device which I connect to when I plug the micro:bit into my computer has nothing to do with the persistent storage and only handles the flashing process. Ideally I would like to be able to mount the persistent storage onto my Linux desktop so I can copy files on and off easily, but I'll settle for any simple tool which gives access.