units for motor speed of a programme.

I am struggling to work out what are the units for the speed in cases such as myOtherMotor->setSpeed(150);. Are they m/s, mm/s, rad/s?

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your complete sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks .. Tom.... :slight_smile:

it's not the circuit that is what I am asking about. It is the unit of this programme part myOtherMotor->setSpeed(250);. 250 what? m/s, mm/s, rad/s. Please tell me.
myMotor->setSpeed(250);
myOtherMotor->setSpeed(250);
myOtherMotor3->setSpeed(250);
myOtherMotor4->setSpeed(250);
myMotor->run(FORWARD);
myOtherMotor->run(FORWARD);
myOtherMotor3->run(FORWARD);
myOtherMotor4->run(FORWARD);
// turn on motor
myMotor->run(RELEASE);
myOtherMotor->run(RELEASE);
myOtherMotor3->run(RELEASE);
myOtherMotor4->run(RELEASE);

Do you have a link to the "myOtherMotor" library?

How can anyone answer if they don't know which library you're using?
One thing is for sure - it's unlikely to be one of the options you suggested. Most likely 'myOtherMotor->setSpeed(150);' is about (150/255) x full speed.

Hi,
We need to know how your are driving your motor, through a MOSFET, a driver PCB, directly from the controller?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

We need to see what libraries you have loaded and how they are setup.

OKAY.. I went the extra mile.Sherlock Mode..

(Crystal Ball at the "The Magic Neep" for service).
You are using an adafruit type motor pcb.
MYMOTOR gave it away.

The commands you are talking about range from 0 to 255, this is the PWM output, 0 == 0% duty cycle, 255 == 100% duty cycle. So this is minimum to maximum speed of the motor.

It does not represent a particular speed unit as the program has no knowledge of the characteristics of your motor.
Note that the speed will not be constant, that it will change as you load the motor unless you have feedback control.

Please can you tell us what is your electronics, programming, arduino, hardware experience?

Hope this helps..... Tom... :slight_smile: