Pages: [1]   Go Down
Author Topic: Waypoint with a GPS and compass  (Read 2591 times)
0 Members and 1 Guest are viewing this topic.
New York
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
digitalWrite( 5, HIGH);
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

-Matt-

New York
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
digitalWrite( 5, HIGH);
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://letsmakerobots.com/node/19554

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

* Driving_in_the_yard.ino (13.99 KB - downloaded 38 times.)
« Last Edit: December 02, 2012, 09:27:13 am by sora628 » Logged

-Matt-

New York
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
digitalWrite( 5, HIGH);
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* 100_2300.JPG (762.83 KB, 2048x1536 - viewed 65 times.)

* 100_2299.JPG (758.22 KB, 2048x1536 - viewed 42 times.)

* 100_2298.JPG (753.54 KB, 1536x2048 - viewed 56 times.)
Logged

-Matt-

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1897
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

sora628
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
Jantje
Logged

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 -

New York
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
digitalWrite( 5, HIGH);
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

-Matt-

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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.
Logged

New York
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
digitalWrite( 5, HIGH);
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

-Matt-

Pages: [1]   Go Up
Jump to: