 | PwmDCMotorSetSpeed Method |
Set the desired motor's speed in revolutions per minute.
Namespace:
Adafruit.IoT.Motors
Assembly:
Adafruit.IoT (in Adafruit.IoT.dll) Version: 1.0.6.0 (1.0.6.0)
Syntaxpublic void SetSpeed(
double rpm
)
Public Sub SetSpeed (
rpm As Double
)
public:
virtual void SetSpeed(
[InAttribute] double rpm
) sealed
Parameters
- rpm
- Type: SystemDouble
The duty cycle of the PWM controller in the range of 0.0 to 1.0.
Implements
IMotorSetSpeed(Double)
Remarks Note |
---|
Although this method has a parameter called rpm, this parameter actually sets the duty cycle of the PWM controller that powers the motor.
|
Remarks
This method sets the value used to modulate the PWM power going to the motor.
In order to change the speed of a running motor you must call this method and then call
Run(Direction) again.
See Also