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 code via TTL/USB adapter

    Scheduled Pinned Locked Moved GPy
    6 Posts 3 Posters 75 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.
    • Don-iotD Offline
      Don-iot
      last edited by

      Trying to upload code via a TTL/USB adapter. The connection works, as I can flash the device with new firmware. But I am missing two pieces of the puzzle. 1) what program/method to update the device via USB, I would prefer the FTP-style of approach and 2) the bootloader grounding pin, when to use it and how, the device LED shows all kind of nice colors, but I am not sure of the correct way to do things. I mean should I let the device start, then ground the pin, keep it grounded, or release it, and what about the reset button on the device, should that be pressed also, and if so when?

      robert-hhR P 2 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Don-iot
        last edited by

        @Don-iot The bootloader pin is sampled at reset. To get into bootloader mode, tie that pin to GND and push reset. You can keep it there as long as you upload the firmware. But for a regular start it has to be removed.
        Since the LED data port is also connected to that pin "P2", it will flash since it sees the pin level bumping as data. Just ignore that.
        For uploading scripts to the device you can indeed use WiFi and ftp. Filezilla is a convenient ftp client. Besides PyMakr there are many other IDE's and command line tools to exchange data. Comabd line tools are for instance rshell, or pyboard.py from the micropython.org web site.

        1 Reply Last reply Reply Quote 0
        • Don-iotD Offline
          Don-iot
          last edited by

          Thanks so much @robert-hh for your help, highly appreciated! Your explanation of the LED is spot on what I have seen, good to know why the color changes.

          The built in FTP-server would be an easy way that even I could understand, but for some odd reason the two GPys I have laying around are not firing up the built in wifi after I completely erased the devices with Pycom Firmware Update. So I turned to rshell and it sort of works, I mean I can access the device but my knowledge of how to basically clone a folder onto the devices /flash folder halts a bit. Can not find the right set of commands. So my third attempt was to try Virtual Studio Code and upload the files the "regular" way that I am used to but VScode, on my mac, does not find the Pycom via the serial adapter, even though rshell and Pycom Firmware Update does.

          Searching for PyCom boards on serial...
          No PyCom boards found on USB
          

          So I guess it needs some magic to work, but I simply do not know how to upload the files. Any ideas are extremely welcome, thanks in advance!

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Don-iot
            last edited by

            @Don-iot The WiFi problem could by caused by pybytes, which uses WiFi for its own purpose. You can stop Pybytes with the commands:

            import pycom
            pycom.pybytes_on_boot(False)

            After reboot you can use WiFi as documented.
            In rshell, the Pycom board files are listed on the path /pyboard/flash
            Then you can use the commands listed under help to access these.

            1 Reply Last reply Reply Quote 0
            • P Offline
              p s @Don-iot
              last edited by

              @Don-iot Did you manage to use the Upload function of Pymakr using a TTL/UART USB adapter? If so, which pins did you connect? RX0 and TX0 only?

              Don-iotD 1 Reply Last reply Reply Quote 0
              • Don-iotD Offline
                Don-iot @p s
                last edited by

                @p-s Yes I did. I had to use TX and RX and as I recall it and then you must connect P2 to ground. I am feeding my GPY with power and ground from this adapter as well. Works great with Pymakr, does not work with Vscode or Atom -at least with my knowledge

                1 Reply Last reply Reply Quote 1

                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