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

Frequent questions asked online, offline, in forums are answered here
HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Thu Mar 23, 2017 5:11 pm

i want to get x and y position of hedge in serial port of arduino so that i can compute heading on my robot.
i got the sample code form this site and i made some changes inside because i am not using ultrasonic sensor and lcd display.
here is the code
forum.rar
(1.3 KiB) Downloaded 34 times

smoker77
Posts: 96
Joined: Sat Feb 06, 2016 4:03 pm

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

Postby smoker77 » Thu Mar 23, 2017 5:43 pm

The Arduino examples not yet supports high resolution mode of coordinates data, so you should disable this mode as shown here:
http://www.marvelmind.com/downloads/millimeters.PNG
Also, your code uses speed 9600 bps. You need to select hedge in dashboard and setup speed as shown on attached picture.
Attachments
uart_speed.PNG
uart_speed.PNG (60.69 KiB) Viewed 1526 times

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Thu Mar 23, 2017 7:46 pm

smoker77 wrote:The Arduino examples not yet supports high resolution mode of coordinates data, so you should disable this mode as shown here:
http://www.marvelmind.com/downloads/millimeters.PNG
Also, your code uses speed 9600 bps. You need to select hedge in dashboard and setup speed as shown on attached picture.

as you said i have done but still i am not getting anything on serial port.

smoker77
Posts: 96
Joined: Sat Feb 06, 2016 4:03 pm

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

Postby smoker77 » Thu Mar 23, 2017 7:58 pm

Have you built and frozen map of stationary beacons? Is the hedgehog updating its position in dashboard? Only in this case hedgehog outputs the coordinates.

Please, share the print screen or video capture.

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Sat Mar 25, 2017 5:22 am

here is the screenshot
Screenshot (146).png
Screenshot (146).png (128.57 KiB) Viewed 1490 times

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Sat Mar 25, 2017 5:38 am

Screenshot (147).png
Screenshot (147).png (112.52 KiB) Viewed 1490 times
one more picture

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Sat Mar 25, 2017 5:52 am

here is my connection
WhatsApp Image 2017-03-25 at 8.20.42 AM.jpeg
WhatsApp Image 2017-03-25 at 8.20.42 AM.jpeg (179.47 KiB) Viewed 1490 times

smoker77
Posts: 96
Joined: Sat Feb 06, 2016 4:03 pm

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

Postby smoker77 » Sat Mar 25, 2017 4:54 pm

I don't sure your connection is correct, on the picture not clear on what pin is the yellow wire placed on the hedgehog. In attachment is the required pinout.
Also, your beacons and hedgehog are very close to each other for correct map building and hedge tracking. When the hedge is transparent or absent in dashboard, the coordinates are not output.
The minimum distance which is measured is about 0.34 m. You can turn off this limitation by disabling the parameter 'ultrasound/minimum distance limitation' for every beacon. Or increase distance between beacons and hedge.
Attachments
beacon_v4.9_pinout_commended_v01.png
beacon_v4.9_pinout_commended_v01.png (46.63 KiB) Viewed 1475 times

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Sat Mar 25, 2017 5:10 pm

i have connection tx1 pin of beacon to arduino mega RX0 and both ground to arduino ground.
Arduino-Mega-2560-Pinout.jpg
Arduino-Mega-2560-Pinout.jpg (162.83 KiB) Viewed 1473 times

HEMANT
Posts: 9
Joined: Thu Mar 23, 2017 4:51 pm

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

Postby HEMANT » Sat Mar 25, 2017 6:30 pm

after a lot of push up i got this but here values are not changing as i move beacon
Screenshot (150).png
Screenshot (150).png (112.5 KiB) Viewed 1469 times


Return to “FAQ”

Who is online

Users browsing this forum: No registered users and 4 guests