Page 4 of 5

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Thu Jul 11, 2019 12:49 pm
by Briser
Hello
How can I get two coordinates from two hedgehogs at the same time and send them to the arduino?

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Thu Jul 11, 2019 8:07 pm
by admin
Briser wrote:Hello
How can I get two coordinates from two hedgehogs at the same time and send them to the arduino?
It depends on which architecture you are in: IA or NIA.
- In IA, all mobile beacons measure location at the same time
- In NIA, all mobile beacons measure position one by one

However, you have a timestamp coming with each location update. So, by have timestamps linked with location updates, you can always adjust match or interpolate positions and time.

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Fri Jul 12, 2019 4:17 am
by Briser
When I want to obtain coordinate and send it to the arduino, I could only pin the RX0, When I change the pin to RX1,I can't get anything.

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Fri Jul 12, 2019 11:32 am
by Briser
Hello!
When I connect a hedgehog to arduino(I want to obtain its coordinate), and I wake up two hedgehogs. But I obtain the two hedgehogs coordinates mixed together from the Serial monitor. So what's the problem? How can I separate them?

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Sat Jul 13, 2019 3:38 pm
by smoker77
Hello.
This is not a problem but a feature.
Locations of all hedgehogs are available from any hedgehog or from modem.
You can separate them by address of hedgehog transmitted in offset 22 of the data packet.
Please see section 1.1.2 of the protocol:
https://marvelmind.com/pics/marvelmind_ ... rfaces.pdf
Also you can use bit 6 in "byte of flags" (offset 21) to differ connected hedgehog from all other hedgehogs.

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Sun Jul 14, 2019 4:03 am
by Briser
smoker77 wrote:Hello.
This is not a problem but a feature.
Locations of all hedgehogs are available from any hedgehog or from modem.
You can separate them by address of hedgehog transmitted in offset 22 of the data packet.
Please see section 1.1.2 of the protocol:
https://marvelmind.com/pics/marvelmind_ ... rfaces.pdf
Also you can use bit 6 in "byte of flags" (offset 21) to differ connected hedgehog from all other hedgehogs.
Hello, this is my code, I don't know how to put your method into practice.
I start a software(10) and use a hardware(RX0) in order to read coordinates of two hedgehogs separately.
Thank you very much!

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Tue Jul 16, 2019 12:20 am
by smoker77
Hello,
I attach two modifications of your code.

1. software11_RX simply filters data from each hedgehog to get only its location and skip location of another hedgehog.
So hedgehog1_x1, hedgehog1_y1 will always receive data from only first hedgehog and hedgehog2_x2, hedgehog2_y2 only from second one.

2. software11a_RX provides same result by another way. For this software you don't need to connect second hedgehog to UART. Locations of both hedgehogs are received from one hedhehog. But you need to specify proper addresses of both hedgehogs in the software in constants HEDGEHOG1_ADDRESS, HEDGEHOG2_ADDRESS. These constants are used to separate locations of different hedgehogs.

These modifications are not tested, but I think they should work.

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Fri Jul 19, 2019 3:19 pm
by Briser
Thanks for your help very much.I have solved this problem.
But when I use the coordinates to control my robot,I find that the coordinate is not stable, it always drift. So how can I improve coordinate stability?

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Sat Jul 27, 2019 6:39 pm
by smoker77
Hello,
Please check the ultrasonic coverage.
Does your mobile beacon on line of sight with stationary beacons?
Please refer to operating manual, especially sections 10.4, 10.5 10.6:
https://marvelmind.com/pics/marvelmind_ ... manual.pdf
Check ultrasonic signals as shown in section 10.5

Re: how to get x,y coordinates of hedge on the serial port of arduino?

Posted: Sun Jul 28, 2019 6:11 am
by Briser
smoker77 wrote:Hello,
Please check the ultrasonic coverage.
Does your mobile beacon on line of sight with stationary beacons?
Please refer to operating manual, especially sections 10.4, 10.5 10.6:
https://marvelmind.com/pics/marvelmind_ ... manual.pdf
Check ultrasonic signals as shown in section 10.5
Thanks for your help, but the manual is too simplified. I don't know how to set the ultrasonic threshold on the Dashboard.
I found that the acquisition of coordinates was delayed, which made my robot mobility had some problems. So how can I eliminate the time delay.