pwm¶
- property DCMotor.pwm: float | int
Pulse Width Modulation duty cycle of the supply voltage of the DC motor.
It must be a
floator anintwithin-1and1.In general the duty cycle can be between
0and1, butpwmcan be between-1and1, in order to take into account the voltage sign with respect to the direction of rotation:if
pwmis positive, then the supply voltage pushes the motor to rotate in the positive direction,if
pwmis negative, then the supply voltage pushes the motor to rotate in the negative direction,if
pwmis null, then the supply voltage is null to and the motor does not develop any driving torque.
The
pwmvalue has an impact on thedriving_torquedeveloped and theelectric_currentabsorbed by the DC motor.Returns¶