Go Down

Topic: Waypoint with a GPS and compass (Read 7463 times) previous topic - next topic


Hello all, I've recently become closer to finishing my AVG, and I need some help creating the code to make the car go to certain waypoint accurately.  I've seen code of people that have done very similar AVG's similar to mine, but I've seem to have run into problems--I'm using the same GPS library and the same compass, yet for some reason the car doesn't want to do anything.   Would anyone be able to help me with this?  Code and pictures are to follow.


Dec 02, 2012, 02:53 pm Last Edit: Dec 02, 2012, 03:27 pm by sora628 Reason: 1
I want to mangle this code a bit to match it with my robot---but the problem is that I'm unsure what some of the things do!

can you help explain?

Here's the website I got the code from--I've begun to alter it but it doesn't work when I upload the code.


The real platform for his car is further down on the page


Attached are some pictures of my AVG--I named it the ASRB


Thanks for the link.
I have a similar job to do (in the near future) and I feel the document  you shared is a good start.
if you want help on the forum you will have more success when you are precise on what is not working.
For instance I am are at location X and want to move to location Y. The car turns to the correct position but doesn't start driving.
From debugging info I see ....
Best regards
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -


Thanks Jantje,

The problem is the I upload the code, the LEDs blinks, the wheels straighten, and nothing happens--Also there is reference to buttons in the code, but I have no idea what they do or where to attach them--also, where would I put in the waypoint?



Which chunk of code are you using, there is quite a lot on that page.  You should start at the top with simple and work your way down.

So start with this AGV_test_turn2.pde, the waypoints are documented in there as floats flat2 flon2 etc.  Play with that code until you understand it.  Then work way through the rest.  The best thing to do is get the steering working, with out having the motors connected, or with the bot on a support so the wheels are off the ground.

You should be able to create your own waypoints with a hand held GPS, so you know exactly where they are in relationship to your bot.  You will need to do that to make sure the steering turns the correct way.


I have previously connected the motors and everything to the car and have been able to get it to avoid obstacles quite well.

What are the changes in the Arduino code since that post and now?

Go Up