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

    How to receive 2 information

    Scheduled Pinned Locked Moved Comments & Feedback
    lopy
    8 Posts 2 Posters 1.5k 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

      Re: Unable to receive 2 information

      Hi there, how can i receive two information from two lopy? Anyone know about this? Thank you in advance.

      J 1 Reply Last reply Reply Quote -1
      • J Offline
        jmarcelino @MJ
        last edited by

        Hi @mj

        Can you explain a bit better what you mean? Where is the information coming from?

        Thanks

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

          Hi @jmarcelino , Currently i wish to get the information from 2 (lopy+expansion board) to received by the another (lopy+pytrack board) but i only manage to received only 1 information.

          For Lopy+Pytrack Board (For receiving information):
          0_1519750128492_659c7f49-f9c7-4e0e-8005-b0b391d0f913-image.png

          For Lopy+Expansion Board (transmit information):
          0_1519750148717_9c79c2a5-40b7-4df2-8545-5f660b7b45dd-image.png

          For Lopy + Expansion Board (Transmit information)
          0_1519750169830_c20bae6e-de2a-484a-9ff5-e4886a0fa5a7-image.png

          • i using IF statement but yet i only can received the 1 information instead of 2 information provided the first IF statement is true.
          • i also tried to make it as comment for the either 1 of the receiving 'D' or 'E' it can only show the information that i want. (also displaying 1 information)
          • i also use ELIF statement but it cannot received any things.

          Result :

          1. Running full coding :
            0_1519750231237_737ef0aa-e3b4-4e2b-9dae-cd6ff7054ad4-image.png

          2. Running with only Lopy+Expansion (power up for B where only B connected) :
            0_1519750265827_066e95d2-a704-4d19-8502-3feb777f29c3-image.png

          3. Running with only Lopy+Expansion (power up for C where only C connected) :
            0_1519750286066_720c1bcd-004a-42af-a599-4602d35170d8-image.png

          4. Running only C with the "#' of B :
            0_1519750313263_99acffd5-b9cd-49aa-8a0d-07b1ddddca92-image.png

          May i know how can i solve this kind of problem? Thanks.

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jmarcelino @MJ
            last edited by jmarcelino

            @mj
            Thank you.

            So from what I understand you have two nodes trying to transmit on the same frequency with LoRa as soon as they receive a signal from the Lopy+Pytrack board (also on LoRa)

            The problem is the time difference between the two will likely be extremely short so the two nodes are effectively trying to transmit on the same frequency at the same time and in doing so interfering with each other. At SF7 packet transmission of a single byte payload will still take about 20ms (dominated by preamble)

            Also I imagine you'll have a relatively large timing inaccuracy between the stack and MicroPython especially with loops involved so I'm not sure what is the practical application of this value.

            Time difference of arrival in LoRa - for geolocation purposes - is normally done with a SX1301 gateway frontend which can listen on 8 frequencies at the same time (so no clashes ) and driven by a FPGA for timing accuracy across the preamble.

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

              Thank you @jmarcelino.

              1. Is it mean that it will not working for receiving the time difference?
              2. How if i have 2 (Pytrack board + Lopy) that handle by different person such as person A and person B that travelling in totally different place and both of their location will be sending to the Lopy+expansion board ? Which mean the Lopy+expansion board will received 2 locations. Is it still working?

              Thank you.

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                jmarcelino @MJ
                last edited by

                @mj
                The problem is you're triggering both nodes to send on receiving 'A' from the main node. If you use different triggers so that the nodes transmit at different times you'll be OK.

                But I don't know what is your purpose around measuring time difference so this may not be what you want.

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

                  thank you @jmarcelino.

                  I applying this for tracking the location of both person using Pytrack+ Lopy which it will send the latitude and longitude to the lopy+expansion board. How can i solve in order to have both set of latitude and longitude?

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jmarcelino @MJ
                    last edited by

                    Depends on your application especially how often do you want to collect that information but as a suggestion just have the main "collector" node listening all the time and then the Pytrack nodes send their position based on some movement threshold - or at random time intervals.

                    What you want is to minimise the chance of on-air collisions due to the PyTrack nodes trying to send their location at the same time.

                    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