Deployment of a Python app on the M5Stick-C from VS code



  • Hi,

    I am using Visual Studio code to write directly my code on the M5Stick-C.
    I can reset and push the code for testing but how to make it persistent.
    I wish I could achieve something similar to the download function available in the UIFlow designer.
    If there is a way to do it in command line it is also welcome.

    I am using the 1.4.0beta firmware.

    Thank you by advance.
    Antowan


  • M5Stack

    Hi @antowan to achieve the same effect as the download function in vscode connect your m5stack to vscode with the m5stack plugin and simply click on the apps folder and press the + button to create a new file in that directory, name the file e.g. "filenamehere.py" copy and paste your code into that file and then save when your done. Now when you reset the M5Stick and go into the app.list you can select your program from the list.



  • @lukasmaximus thank you, it does the job!

    Is there a way to upload multiple files at once ? I have folder with multiple images that I upload in the res/ folder but I have to upload manually each image.
    Ideally I wish I could have an option to upload all my project at once (.py and resource files).
    If there is any way to do that especially in vs code that would be a great gain of time.

    Thank you,
    Antowan


  • M5Stack

    As far as I am aware that feature is unavailable right now in vs code or any other software for now sorry. I can only suggest you put all your files on an sd card and reference them in your python script