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

    UART and SD communication conflicts - fipy board

    Scheduled Pinned Locked Moved FiPy
    5 Posts 2 Posters 208 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.
    • G Offline
      GarciaMoises
      last edited by GarciaMoises

      Hello there,

      I have a fipy module that is communicating through UART with a sensor and it is storing/uploading the data on the pybytes server.

      Now, I would like to save the data into an SD (which is connected to the available slot in the ExpansionBoard V3.1) in case the pybytes connection is not established, and upload the data once connection is restored.

      I am aware that the pin "P4" is the Rx line for the UART communication, and that it is also used to control the CMD of the SD card.

      I have tried to change the Rx line to other pins, but the communication is still conflicting. It seems that the device doesn´t care if I try to configure another pin as Rx. I have tried to change the Rx pin also without the SD feature but the module does the same.

      Any advice or solution will be immensely appreciated.

      Best wishes,
      Moises.

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

        @GarciaMoises can you show the code lines you use to set up the UART? Note that should all parameters for the UART, e.g. speed and pin configuration in one init call or in the constructor call. A call for uart.init() which just sets the speed resets the default pins.

        1 Reply Last reply Reply Quote 0
        • G Offline
          GarciaMoises
          last edited by GarciaMoises

          Hello @robert-hh I have the initial code as follows:

          uart = UART(1, baudrate=9600, pins=('P3','P11'))
          uart.init(9600, bits=8, parity=None, stop=1)

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

            @GarciaMoises drop the call to uart.init(). It is not needed and will reset the pins to the default values.

            G 1 Reply Last reply Reply Quote 1
            • G Offline
              GarciaMoises @robert-hh
              last edited by

              @robert-hh Thanks a lot for the help. Now it works and I can continue.

              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