Go Down

Topic: Dagu Rover 5 chassis robot demo (Read 43 times) previous topic - next topic

troymcklure

Nick,

I have the same setup as you to in this tutorial, but i cannot get the bot to move  for more than .5 seconds per direction. I havent changed any code at all and double checked the wiring.

Also in the code, to a novice, it appears you are using pins 8 and 9 as pin A & B respectively, but in the diagram they are not hooked up.. Could you please explain that to me.

Thanks!

Nick Gammon

Pins 8 and 9 were for the rotary encoders which I didn't use in the end, although the article talked about them.

It stops after about a second if it doesn't get another message from the remote, so it sounds like the connection might be flaky.

You could change this:

Code: [Select]
const unsigned long TIME_BEFORE_WE_GIVE_UP = 1000;  // ms

Where 1000 mS is 1 second. But you probably need to work out the underlying problem. Do you have an aerial at all? I stuck a short bit of wire in to help with that.

troymcklure

#17
Apr 08, 2012, 06:15 am Last Edit: Apr 08, 2012, 06:18 am by troymcklure Reason: 1
Also for the interrupt 0 assignment, that doesnt seem to be hooked up either,.   Sorry I am rather new at this.

To clarify, my rover is going thru the fwd, left, backwards, right sequence but it is only moving for like .25 to .5 a sec before changing to the next direction in the list.

Nick Gammon

Oh I thought you were referring to this:

http://www.gammon.com.au/forum/?id=11506

The forum is incredibly slow right now, it's taking 5 minutes for a page to load, so please bear with me.

Here, in the code on page 1 of this thread:

Code: [Select]
  delay (500);
 
}  // end of loop


So it changes direction every 1/2 a second. Change that to a bigger figure if you want.

gearz

The forum is incredibly slow right now, it's taking 5 minutes for a page to load, so please bear with me.....

Your not alone,  the site is sooo slow lately.   Whats goin on? ...   Wait don't answer that.  I will start my own thread to hijack.

Go Up