go away spammer

Author Topic: Axon problems  (Read 6743 times)

0 Members and 1 Guest are viewing this topic.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Axon problems
« Reply #30 on: March 18, 2010, 07:55:02 PM »
Coz

delay_ms((TICK_COUNT)5000000);

equals 5000 seconds!!

So either use
delay_ms(5000);   // 5000ms = 5 sec
or
delay_us(5000000);   // 5000000us = 5 sec

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #31 on: March 18, 2010, 08:08:15 PM »
yea, I didn't realize that. haha. I did change it but it still keeps going forward indefinitely

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Axon problems
« Reply #32 on: March 18, 2010, 08:12:05 PM »
Ok so heres your next problem.
Think of 'appControl' being wrapped in a while(1){} loop
So your code is like this:

while(1){  // ie loop FOREVER
  set motors to go forward
  wait 5 seconds
  set motors to stop
}

So your motors stop, but then the loop starts again and makes them go forwards. So they stop for a minute fraction of a second.

Try adding another delay after your 'stop' command.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #33 on: March 18, 2010, 08:25:25 PM »
hey that worked man. we got it driving forward for 5 seconds then stopping for 5 seconds. I can work with that. So I just need to keep including these delays after the stop intervals and everything should be good. Thanks man

 


Get Your Ad Here