Code for interfacing Arduino with a hedgehog (using UART)

Frequent questions asked online, offline, in forums are answered here
Alexander_Marvelmind
Posts: 11
Joined: Tue Mar 20, 2018 12:46 pm

Code for interfacing Arduino with a hedgehog (using UART)

Postby Alexander_Marvelmind » Mon Nov 19, 2018 6:31 pm

I am using the starter code provided for interfacing the Arduino with a hedgehog using UART. The mobile beacon is transmitting data to the microcontroller, but upon reading the data, the data id has a huge error. I saw in the marvelmind_beacon_interfaces_v2017_09_13 document that the “code of data in packet” can range from 0x0001 to 0x0003 plus some extra codes for transmitting and mm precision data, but the data my beacon is sending to the microcontroller is nowhere near those valid codes. It ranges from 0x0151 to 0x1522. The first two segments of data of 0xFF and 0x47 is being received correctly but after this, the code does not match any of the expected values. Do you know what could be a possible cause of this and how I can get this to work?

e.i. The expected is 0xFF 0x47 0x00 0x01 but my beacon is sending 0xFF 0x47 0x15 0x22. I thought it might be the beacon, so I switched it with another beacon and it still does not work. The beacons are outputting the NMEA format just fine though

Alexander_Marvelmind
Posts: 11
Joined: Tue Mar 20, 2018 12:46 pm

Re: Code for interfacing Arduino with a hedgehog (using UART)

Postby Alexander_Marvelmind » Mon Nov 19, 2018 6:32 pm

In several latest versions by default they should send 0x0011 codes instead 0x0001.
0x0001 mean low resolution data, 0x0011 - high resolution.
See section 1.1.2 of the protocol:
https://marvelmind.com/pics/marvelmind_ ... rfaces.pdf

Also, even in low resolution mode the expected sequence is 0xFF 0x47 0x01 0x00, not 0xFF 0x47 0x00 0x01.
Because codes are transmitting in little endian format, starting from low byte.

cmunireddy
Posts: 1
Joined: Mon Apr 08, 2019 7:02 am

Re: Code for interfacing Arduino with a hedgehog (using UART)

Postby cmunireddy » Mon Apr 08, 2019 7:08 am

Hello Alexander,

May I know if you succeeded in obtaining values from hedgehog to arduino and moving robot? If yes please comment here as I would require some help as soon as possible. Thank you.

Thanks!!

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

Re: Code for interfacing Arduino with a hedgehog (using UART)

Postby smoker77 » Wed Apr 17, 2019 3:47 pm

Hello,
We didn't tested Arduino-based robots in Marvelmind.
But we have tested all provided Arduino examples of communication with our devices.
Many of our customers are building robots based on Arduino and get data from mobile beacons, please read for example this topic:
viewtopic.php?f=2&t=2470&start=10


Return to “FAQ”

Who is online

Users browsing this forum: No registered users and 4 guests