Motors not running
Topic last updated
17 Feb 2012, by
Jack Ruben.
3 replies
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.
- include "mbed.h"
- 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;
}
}
Replies
Start by moving:
... 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.
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.
- include "mbed.h"
- 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;
}
}
Start by moving:
... 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.
- include "mbed.h"
And stil is my motor not running wish this programm.What is a solution?
- 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;
}
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.
Please log in to post a reply.
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.
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;
}
}