go_away

Author Topic: Axon problems  (Read 3740 times)

0 Members and 1 Guest are viewing this topic.

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Axon problems
« on: March 13, 2010, 12:43:36 PM »
I'm using the Axon and the Webbotlib and following all of the instructions. I believe that my code is good and I should be seeing some effects but I'm getting notihing. I just want it drive forward and stop to test and see if my code setup is working. When I communicate with the com it works fine and when I turn on the Axon it will say it programs and verifies sucessufully. However, the robot doesn't do anything. I'm using the Sabertooth and driving it with servo code from the lib. Does anyone have any idea what the problem could be?

I'll include my code:

#include "sys/axon.h"
#include "a2d.h"
#include "servos.h"



// Define two motors
SERVO m1a = MAKE_SERVO(FALSE, E3,1500,0);
SERVO m2a = MAKE_SERVO(TRUE, E4,1500,0);


// Create the list - remember to place an & at the start of each servo name
SERVO_LIST servos[] = {&m1a,&m2a};

// Create a driver for the list of servos
SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos);

// Initialise the servos
void appInitHardware(void){
   servosInit(&bank1, TIMER1_COMPAREA);
   }
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   return 0;
   }
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){


   // go forwards
   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   return 32000

   void delay32000ms(uint32_t ms);

   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   void delay32000ms(uint32_t ms);

   act_setSpeed(&m1a,0);
   act_setSpeed(&m2a,0);
   
}



Thanks in advance!!!

Offline GWER57

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Axon problems
« Reply #1 on: March 13, 2010, 12:57:17 PM »
You don't have a semicolon after the return 32000 for whatever its worth. Make sure everything is connected correctly electrically first though.
GTW

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #2 on: March 13, 2010, 01:03:27 PM »
I think everything is..and I'll add that semicolon in there and see if that does it. I got the motor driver sides plugged into E3 and E4 in the Axon by the way

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #3 on: March 13, 2010, 01:40:19 PM »
@benjammin105

You are using code designed for driving ordinary Hitech/Futaba servos - but you say that you are actually using a Sabertooth motor (not servo!) controller.

ie you've written the wrong code for the right controller - or is it the right code for the wrong controller!

I really suggest you go to http://webbot.org.uk/iPoint/37.page and read about, and then run, the Project Designer to create a new project. The only requirement is that you have got a Java runtime installed.

This lets you set up all the Sabertooth motors and even shows you how to set the DIP switches on the board for your config. It will also generate all the code and even create a AVRStudio project file for you.

It will also generate an example 'main' program that will turn the motors backwards and forwards.

Get that working - and then you can start changing the generated 'main' code. Give me a shout if you get stuck.
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 #4 on: March 13, 2010, 01:50:04 PM »
hey thanks man! I'm definitely gonna do that! hey we got the Sabertooth 2x5 RC...this will work for the RC too??

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #5 on: March 13, 2010, 04:57:31 PM »
I tried the Java app out and it is pretty nice but I was told my RC Sabertooth has to be driven by a servo PWM. I'm wanting to use the hardware PWM and I'm on pins E5 and E6 now but I'm still having problems...any ideas?

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #6 on: March 13, 2010, 05:41:24 PM »
I tried the Java app out and it is pretty nice but I was told my RC Sabertooth has to be driven by a servo PWM. I'm wanting to use the hardware PWM and I'm on pins E5 and E6 now but I'm still having problems...any ideas?

Ahah the 2x5 RC is a 'completely' different device.

The 2x5 that is support by WebbotLib is driven via a UART.

Hence my confusion.

My bad.

Had a quick look at the Sabertooth docs and they are a bit 'vague'. But yes - I guess you need to generate servo pulses as per your code. But its anyones guess as to how to set the DIP switches on the board.

So going back to your program...

Code: [Select]
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){


   // go forwards
   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   return 32000                                 *** missing a semi colon

   *** Everything else will be ignored or give errors ! ******

   void delay32000ms(uint32_t ms);

   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   void delay32000ms(uint32_t ms);

   act_setSpeed(&m1a,0);
   act_setSpeed(&m2a,0);
   
}


Just try
[
Code: [Select]
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){


   // go forwards
   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   return 0;


It should at least make the motors go forwards. If you've got a standard servo then plug that in instead and it will turn fully one way.
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 #7 on: March 13, 2010, 05:53:51 PM »
yea, I'm trying to get to that. I'm having a bigger problem now. It won't even program it. I get CRC errors or it will just do nothing til I abort it. Are E4 and E5 the right pins to plug the motors to? Does my code reflect these connections correctly? I also wanted to try using the servoPWNInit in my code as opposed to the servoInit but it gives me errors when I do...I'm stuck

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #8 on: March 13, 2010, 05:55:39 PM »
Here's the code and I've plugged the Sabertooth RC into E4 and E5:


#include "sys/axon.h"
#include "a2d.h"
#include "servos.h"

// Define two motors
SERVO m1a = MAKE_SERVO(TRUE, E4,1500,0);
SERVO m2a = MAKE_SERVO(FALSE, E5,1500,0);


// Create the list - remember to place an & at the start of each servo name
SERVO_LIST servos[] = {&m1a,&m2a};

// Create a driver for the list of servos
SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos);

// Initialise the servos
void appInitHardware(void){
   servosInit(&bank1, TIMER1_COMPAREA);
   }
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   return 0;
   }
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){


   // go forwards
   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   //return 32000;

   //void delay32000ms(uint32_t ms);

   //act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   //act_setSpeed(&m2a,DRIVE_SPEED_MAX);

   //void delay32000ms(uint32_t ms);

   //act_setSpeed(&m1a,0);
   //act_setSpeed(&m2a,0);
   
}

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #9 on: March 13, 2010, 06:16:01 PM »
It just keeps doing this:


C:\DOCUME~1\XPMUser\MYDOCU~1\default>FBOOT17.EXE -b19200 -c3 -pTest.hex -vTest.h
ex
COM 3 at 19200 Baud: Connected
Bootloader V2.1
Target: 1E9608 C:\DOCUME~1\XPMUSER\MYDOCU~1\DEFAULT\FBOOT17.DEF
Buffer: 7168 Byte
Size available: 64512 Byte
CRC-Error


...or it will do nothing at all  ???

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #10 on: March 13, 2010, 06:25:51 PM »
I went back into device manager and configured my baud rate for COM port 3 (which is my axon USB) to 19200 and now I get this:


C:\Documents and Settings\XPMUser\My Documents\default>FBOOT17.EXE -b19200 -c3 -
pTest.hex -vTest.hex
COM 3 at 19200 Baud: Connected
Bootloader VFFFFFFFF.FF
Error, wrong device informations


Can someone please help me here. I wanna at least see this thing move today...

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #11 on: March 13, 2010, 07:44:27 PM »
So I changed the baud rate to 115200 and I charged the battery for the axon and that handled some of the bootloader problems. It programmed successfully but it will still do absolutely nothing after it has been programmed. I'm officially out of ideas...if anyone has any idea what could be wrong please let me know

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #12 on: March 13, 2010, 08:48:00 PM »
Nice to see a blog of your bootloader issue and how to fix it  ;)

Looking at your new code then appControl now has NO return value - so you will be getting a compile warning/error but are ignoring it.

As per my previous postings then this routine could end with:
return 0;

NB I'm not saying that WILL definitely fix your problem - just saying that code that doesn't compile correctly will immediately be "pointed at".
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 #13 on: March 13, 2010, 08:54:35 PM »
Yea adding that return does get rid of my warning about control function. Thanks, but I'm just dying to know why my robot just sits there no matter what I program to it.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #14 on: March 13, 2010, 09:41:04 PM »
Since I dont have a Sabertooth RC then its hard to give any further advice. Hence my only suggestion was to try connecting a standard servo.

There are certainly other posts on SoR about the Sabertooth RC.

good luck
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 #15 on: March 13, 2010, 10:15:29 PM »
My axon doesn't move a servo either. It doesn't do anything

Offline dellagd

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: Axon problems
« Reply #16 on: March 14, 2010, 07:33:21 AM »
could he possibly have messed up the fuses or deleted the bootloader on the axon?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #17 on: March 14, 2010, 09:20:35 AM »
I figured it out. I changed it to hardware pwm and my range was set to 0 so when it was increased to 500 it began to work.
It pulls to the right so I guess my left side is moving faster so I'm gonna decrease the range on it until it rides straight.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #18 on: March 14, 2010, 03:44:30 PM »
Well spotted.

Once you've got your center and range sorted then I find it useful to put something like a sticky label onto the servo/motor with the values recorded. So if I re-use the parts then I can see its characteristics as a start point.

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 #19 on: March 14, 2010, 05:50:15 PM »
Yea, I'm a beginner so debugging takes me a while. Hey Web I got another question actually...I'm trying to get the robot to drive forward for a certain amount of time and then stop now. I was trying to insert a delay while the speed is set the first time and then set the speed to 0 but its not really working. I looked in my C book and tried a for loop statement and thats not doing it either. I was wondering if you have any suggestions...here it is with the for loop:


#include "sys/axon.h"
#include "a2d.h"
#include "servos.h"

// Define two motors
SERVO m2a = MAKE_SERVO(FALSE, E5,1499,453); //left side
SERVO m1a = MAKE_SERVO(TRUE, E4,1500,503);  //right side



// Create the list - remember to place an & at the start of each servo name
SERVO_LIST servos[] = {&m1a,&m2a};

// Create a driver for the list of servos
SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos);

// Initialise the servos
void appInitHardware(void){
   servoPWMInit(&bank1);
   }
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){


   return 0;
   }
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){

int counter;

for (counter =1; counter <=10; counter++)
{

   // go forwards
   act_setSpeed(&m1a,DRIVE_SPEED_MAX);
   act_setSpeed(&m2a,DRIVE_SPEED_MAX);
   return 0;

}
    act_setSpeed(&m1a,0);
   act_setSpeed(&m2a,0);

return 0;

}

Offline dellagd

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: Axon problems
« Reply #20 on: March 14, 2010, 07:02:13 PM »
in order for that to work you would need to set the servos (I know they are actually motors) to "BRAKE" (DRIVE_SPEED_BRAKE) to make them stop moving after the the code exits from the 'for' function
« Last Edit: March 14, 2010, 07:03:45 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #21 on: March 14, 2010, 09:35:11 PM »
@benjamin

First off: you need to remember that the 'appControl' logic is called repeatedly. Unlike a PC program it never ends.
So one pass of appControl is just one 'loop' and is called over and over.

Your for loop tells the motors 10 times to go fwd. But these cmds will execute very quickly. Then you tell the motors to stop.
This is then repeated forever. So you will probably see the robot spend most of its time going fwd with the occasional jerk when it has been told to stop (which will only last for a few microseconds).

What you need to look into is a 'state machine'. In simple terms: this means that your robot, at any moment in time, is in a given state such as:
going fwds,  tracking an object, reversing, turning etc. But it can only be in one state at a time.

So at the top of your program - have some #defines to define unique numbers for each state ie
#define STATE_FWD 1
#define STATE_STOP 2
#define STATE_REVERSE 3
#define STATE_TURN 4
etc
and then a variable that is initialised with the start state eg
int state = STATE_FWD;  // We start in the state saying go fwds

In your 'appControl' you can use the C switch statement to run different code depending on the current state. eg

switch(state){
  case STATE_FWD:
      // I'm going fwds so use my distance sensors to look for objects
      // If I find one then change the state to STATE_REVERSE
      set motors to full ahead
      if I detect an obstacle then set state = STATE_REVERSE;
  break;
  case STATE_REVERSE:
      set motors to go in reverse
  break;
 
  --etc--
}

So you also need to think about what makes it change from one state to another state.
This could be an action: such as 'I've hit something'  (the new state may be REVERSE), or 'I can see something ahead I need to avoid' (the new state may be TURN)
OR it could an internal thing like a timer. EG if you've hit a wall and go into the REVERSE state then you may want to record the current time (using clockGetus() ). The reverse state then uses clockHasElapsed to see if it has been reversing for a given duration and if so then switches to another state (TURN for example).

So you need to get your head around moving away from linear programming. ie your simple PC program starts up, runs around some loops, if/thens etc and exits. So you can read the program from top to bottom.

In state driven programming its not like that. Its more like a flower head (yep - bear with me!).
The center of the flower is your main loop and its very small. Its only purpose is to look at the 'state' and then redirect you off to the relevant petal. The code there does a quick job and then returns back to the center. A change in state makes the code now go to another petal.

I'm sure there is stuff out there that explains it better!  :o
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 #22 on: March 15, 2010, 06:59:04 PM »
I like the idea of state based programming but my current application is calling for basic drive commands. I was wondering if I can use one of those #define statements to set up a series of drive commands almost like a subroutine. I guess I could build some subroutines of drive commands and call them when needed. I'm just having a problem with the timing. If I want it drive for a certain speed I want it to do that for a specific time some I can cover a specific distance ya know. Thats where I'm kinda stuck. I'm going to try setting up some of that in the define and calling them in the appInit.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #23 on: March 15, 2010, 08:02:04 PM »
You really DO need state based programming.
Here's why:-
If your robot is going fwds then it may hit something. So what do you do: may reverse for 5 seconds, turn, go fwd again.

But now what happens if you hit something when you are reversing / turning?

Trying to do it as you suggest then you end up with an incredibly complex, large and slow piece of code.

With state programming its easier. If you hit something then you just flip the state between fwd or reverse.

But hey: try doing your idea. Get something going. Get the emotional reward of something that works. Improve it later.
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 #24 on: March 15, 2010, 08:39:05 PM »
My robot is gonna be on a certain course where certain movements have to taken to get from one place to the other. I need to figure out if I define something at the top how to call it in the code without if statements and stuff like that. I'm getting an error right now and I can't build. Here's the code I'm trying to mess with now;


#include "sys/axon.h"
#include "a2d.h"
#include "servos.h"


// Define two motors
SERVO m2a = MAKE_SERVO(FALSE, E5,1499,453); //left side
SERVO m1a = MAKE_SERVO(TRUE, E4,1500,503);  //right side

// Create the list - remember to place an & at the start of each servo name
SERVO_LIST servos[] = {&m1a,&m2a};

// Create a driver for the list of servos
SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos);

#define STATE_FWD 0 =act_setSpeed(&m1a,DRIVE_SPEED_MAX)&act_setSpeed(&m2a,DRIVE_SPEED_MAX);
#define STATE_STOP 1 =act_setSpeed(&m2a,0)&act_setSpeed(&m1a,0);

// Global variable that indicates the current state
uint8_t state;

// How long to reverse for in microseconds ie this = 5 seconds
#define TIME_TO_REVERSE ((TICK_COUNT)5000000);

// Initialise the servos
void appInitHardware(void){
   servoPWMInit(&bank1);
   }
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   
   return 0;
   }
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){


 

   STATE_FWD 0;
   TIME_TO_REVERSE;
   return 0;
   
   state = STATE_STOP 1;
   return 0;


}
    





Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: Axon problems
« Reply #25 on: March 15, 2010, 09:38:50 PM »
Whats the error?


Why not do something like:

turn_robot();
delay_ms(1000);
straight_robot();
delay_ms(1000);
turn_robot();
delay_ms(1000);
reverse_robot();
delay_ms(1000);

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #26 on: March 15, 2010, 09:41:51 PM »
The error is that it wants a void under the appControl for the STATE_FWD the other state command.

I want to do something like that but I was trying to see if I could define them all at the top and sort of call them as I need them

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Axon problems
« Reply #27 on: March 16, 2010, 08:27:53 PM »
Your #defines for STATE_FWD have multiple statements ie many act_setSpeed but there is no ';' in between
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 Jack-in-the-bot

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Axon problems
« Reply #28 on: March 18, 2010, 07:16:53 PM »
 I know some C. you should try the delay without defining stuff
« Last Edit: March 18, 2010, 07:25:10 PM by Jack-in-the-bot »

Offline benjammin105Topic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Axon problems
« Reply #29 on: March 18, 2010, 07:33:12 PM »
I need to know why this doesn't make the robot go and stop after 5 seconds. I've been trying to figure this out for a week. Why isn't there any easy way to control something for a predetermined period of time??


#include "sys/axon.h"
#include "a2d.h"
#include "servos.h"

// Define two motors

SERVO m2a = MAKE_SERVO(FALSE, E5,1499,453); //left side
SERVO m1a = MAKE_SERVO(TRUE, E4,1500,503);  //right side

// Create the list - remember to place an & at the start of each servo name
SERVO_LIST servos[] = {&m1a,&m2a};

// Create a driver for the list of servos

SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos);


// Global variable that indicates the current state

uint8_t state;





// Initialise the servos

void appInitHardware(void){
   servoPWMInit(&bank1);
   }
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
   return 0;
   }
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){

act_setSpeed(&m1a,DRIVE_SPEED_MAX);
act_setSpeed(&m2a,DRIVE_SPEED_MAX);

// How long to reverse for in microseconds ie this = 5 seconds
delay_ms((TICK_COUNT)5000000);
act_setSpeed(&m1a,DRIVE_SPEED_BRAKE);
act_setSpeed(&m2a,DRIVE_SPEED_BRAKE);

return 0;
}
    




 


Get Your Ad Here

data_list