Motors not running

04 Jul 2012

Can anyone tel me why this program is not working? Thanks ferry mutch. Jack. /*- Includes ------*/

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

/*--- Includes ------------------------------*/
#include "mbed.h"
#include "drive.h"
int ML=0, MR=0;
int MaxSpeed=0;
Drive XBeat(p21,p22);                                       //Left, Right Servo Motor
int main() {
    while (1) {
        MaxSpeed = 100;
        MR = MaxSpeed;
        ML = MaxSpeed;
    }
} 

Now with code tags around it, that makes it readable.

Now I am probably blind, but I can't seem to find the library you are using. But for sure you are just assigning a few integers a value, and not actually doing anything with them. I would expect a function like XBeat.setSpeed(integer/float);

Edit: Not blind, was just hard to find, here we got it: http://mbed.org/users/n0p/programs/xbeat-hoppel-code/lm35k6/docs/drive_8h_source.html

So from that library what you need to do is add:

XBeat.move(ML, MR);
05 Jul 2012

Hallo Erik.

Thank you for respons and help. Now the motors are running.

Jack