Hello,
I have got a question about the unit of the Speed in the move command.
When i have got there a value of 9000, what say me the value? which unit is it?
I hope you can help me
Speed: This indicated the time between each step. A larger number
results in a slower running motor. A lower number results in a
faster running motor. Min: 1. Max: 255. If the number is too low, it
is possible that the motor stops running, depending on the motor’s
properties.
is it also so when i write a program in c++?
cause now i got a speed off 7000 and for example a speed of 9000 is faster. that make no sense.
Everything larger than a byte will by truncated, so we’d recommend to use a value between 1 and 255.
[quote]cause now i got a speed off 7000 and for example a speed of 9000 is faster. that make no sense.[/quote]This is actually pretty logical if you know that the speed is stored in a single byte.
Consider this example:[code]
#include <stdio.h>
int main(int argc, char *argv[])
{
unsigned char val;
val = 7000;
printf("%d\n", val); // prints 88
val = 9000;
printf("%d\n", val); // prints 40
return 0;
}
[/code]