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

    Upload Libraries

    Scheduled Pinned Locked Moved Comments & Feedback
    pytracklopyexpansion board
    4 Posts 2 Posters 1.9k Views 2 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.
    • M Offline
      MJ
      last edited by

      Hi there, i am new to pycom device. I am confuse after i read through the pycom.docs. After i have installed the libraries of the pytrack .py file and i navigate the related .py for pytrack in a new folder. I have few questions.

      1. Is it correct to add the regarding pytrack libraries folder in the atom software?
      2. How to upload the libraries to our pycom device?
      3. Where can i get the below files to add in the libraries folder?
      4. How to get main.py ?

      0_1508692766971_c9ca88be-ccb9-45c8-8cef-d65d4573fe3d-image.png

      appreciate for your help :)

      1 Reply Last reply Reply Quote 0
      • RobTuDelftR Offline
        RobTuDelft
        last edited by

        You can place the library files wherever you like, but /flash/lib is in the sys.path by default so it is easy to use. If you use another location, e.g. /flash/pytrack you would do:

        import sys
        sys.path.append('/flash/pytrack')
        

        Just add a project in Atom (only one) and add the required folders and then sync the project to your Pycom device. You can also use an FTP client like Filezilla to transfer your scripts and libraries.
        You can just create a new main.py on your computer from within the same project. That will then also be included in the sync.

        Without data you're just another person with an opinion.
        Hackster | About me

        1 Reply Last reply Reply Quote 1
        • M Offline
          MJ
          last edited by MJ

          Hi @RobTuDelft , i still have a little bit confuse on that. I go the File and click add new folder and i place my .py file in the pytrack lib folder. I have this :

          0_1508729989856_03c0bfe6-5e05-40e8-805d-893557213bd5-image.png

          Is it correct? And i wanna add the GPS feature to the pytrack so i just go to setting either to sync folder or sync the file. Is it better for me to sync all the pytrack libraries( L76GNSS.py, LIS2HH12.py, pytrack.py) to the pytrack board?

          RobTuDelftR 1 Reply Last reply Reply Quote 0
          • RobTuDelftR Offline
            RobTuDelft @MJ
            last edited by

            @mj If you are familiar with Python: when you import functionality (with the import statement), from another file (known as a module), you don't have to specify the exact path of the module. The Python run-time will actually look for the imported file in the paths as specified by sys.path.

            Be sure to read this as it might be helpful for you.

            Without data you're just another person with an opinion.
            Hackster | About me

            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