RomiMotor module
- class RomiMotor.RomiMotor(pwm_tim, effort_pin, direction_pin, enable_pin, encoder, invert_flag)
Bases:
object
- closed_loop(kp, ki, desired_speed)
Function within the RomiMotor class to run closed loop control of the motor
Sets the duty cycles of the motor utilizing a desired speed and a PI Controller
- disable()
Function within the RomiMotor class to set the enable pin of the motor to false
- enable()
Function within the RomiMotor class to set the enable pin of the motor to true
- get_speed()
Function within the RomiMotor class to get the current speed of the motor :returns: Returns the speed of the motor in rpm
- set_duty(duty)
Function within the RomiMotor class to set the current speed of the motor