How to receive 2 information
Hi there, how can i receive two information from two lopy? Anyone know about this? Thank you in advance.
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.
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?
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.
MJ last edited by MJ
Thank you @jmarcelino.
- Is it mean that it will not working for receiving the time difference?
- 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?
jmarcelino last edited by jmarcelino
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.
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):
For Lopy+Expansion Board (transmit information):
For Lopy + Expansion Board (Transmit information)
- 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.
Running full coding :
Running with only Lopy+Expansion (power up for B where only B connected) :
Running with only Lopy+Expansion (power up for C where only C connected) :
Running only C with the "#' of B :
May i know how can i solve this kind of problem? Thanks.
Can you explain a bit better what you mean? Where is the information coming from?