Motors not running

14 Feb 2012

Thanks fot the reply, but any help is welcom.

Hallo.

In this programm the motors are not running. What is wrong im my programm?

Greetigs Jack.

  1. include "mbed.h"
  2. include "drive.h"

int ML=0, MR=0;

int MaxSpeed=0;

int main() {

while(1){

Drive XBeat(p21,p22); Left, Right Servo Motor MaxSpeed = 100;

MR = MaxSpeed;

ML = MaxSpeed;

}

}

14 Feb 2012

Start by moving:

Drive XBeat(p21,p22); 

... up to the section with the integer declarations, and outside your MAIN function.

FWIW, if you look at the "editing tips" link below the post text entry box, you can see how I have highlighted that line of code to make it easier for everyone to read the code.

16 Feb 2012

Jack Ruben wrote:

Thanks fot the reply, but any help is welcom.

Hallo.

In this programm the motors are not running. What is wrong im my programm?

Greetigs Jack.

  1. include "mbed.h"
  2. include "drive.h"

int ML=0, MR=0;

int MaxSpeed=0;

int main() {

while(1){

Drive XBeat(p21,p22); Left, Right Servo Motor MaxSpeed = 100;

MR = MaxSpeed;

ML = MaxSpeed;

}

}

Scott O'Brien wrote:

Start by moving:

Drive XBeat(p21,p22); 

... up to the section with the integer declarations, and outside your MAIN function.

FWIW, if you look at the "editing tips" link below the post text entry box, you can see how I have highlighted that line of code to make it easier for everyone to read the code.

  1. include "mbed.h"

And stil is my motor not running wish this programm.What is a solution?

  1. include "drive.h" int ML=0, MR=0; int MaxSpeed=0; Drive XBeat(p21,p22); Left, Right Servo Motor int main() { MaxSpeed = 100; MR = MaxSpeed; ML = MaxSpeed; }
17 Feb 2012

You havent given any details about "drive.h" so it makes it hard to help you, but the line

Left, Right Servo Motor int main () .... 

doesnt look like correct C code to me. What are you trying to achieve on this line?

And once again, if you look at the "editing tips" link below the post text entry box, you can see how to highlight the lines of code to make it easier for everyone to read your code and therefore help you.