Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Uploading code via Python script tips?

    Scheduled Pinned Locked Moved Comments & Feedback
    4 Posts 2 Posters 44 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      troy salt
      last edited by

      Hi All,

      I'm planning on making a python based GUI for my product. One of the features I want to implement is to update code on the Pycom. The Device will be connected via USB. Anyone have any pointers on how to do this? Any suggestions on where to start looking will be greatly appreciated.

      Thanks,
      Troy

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matthew Felgate 0 Global Moderator
        last edited by

        Hi Troy

        Pycom boards are best managed through the Visual Studio Pymakr extension and Pybytes deployments online: https://docs.pycom.io/pybytes/releases/deploy/ (we are working on API access to pybytes at the moment)

        However in Python you could use Pyserial to interface with the board over USB: https://pyserial.readthedocs.io/en/latest/shortintro.html

        And you could use rshell for uploading and downloading files: https://github.com/dhylands/rshell

        Let me know if this helps you.

        Matt

        1 Reply Last reply Reply Quote 2
        • T Offline
          troy salt
          last edited by

          Thanks @Matthew-Felgate-0

          Thanks for the pointer. researching this definitely helped me understand the process more. While this solution would work via terminal commands, I don't think it would work via a python script running on my computer. I'm still looking into it.

          Much appreciated.
          Troy

          M 1 Reply Last reply Reply Quote 0
          • M Offline
            Matthew Felgate 0 Global Moderator @troy salt
            last edited by Matthew Felgate 0

            @troy-salt

            Hi Troy

            Pyserial I believe can be run in python script. Could you not use your python script to execute terminal commands like rshell?

            Yours
            Matt

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom