WALL-E motor driver class that uses pololu Romi Motors.
More...
#include <romiMotor.h>
|
| | RomiMotor (GPIO_TypeDef *enPort, uint16_t enPin, GPIO_TypeDef *phPort, uint16_t phPin, GPIO_TypeDef *slPort, uint16_t slPin) |
| | Construction for the ROMI Motor Class.
|
| void | setSpeed (int8_t) |
| | Function Sets the Direction of the PWM Signal and changes direction based on the duty value.
|
| void | updatePWM () |
| | Function uses and internal timer to trigger PWM signals via this function through the use of the PWM/Duty Cycle Given.
|
| void | enable () |
| | Function Enables the motor to operate based on the PWM.
|
| void | disable () |
| | Function disables the motor to no longer respond to pwm signals.
|
| int8_t | getDuty () |
| | Function allows the user to get the current duty.
|
WALL-E motor driver class that uses pololu Romi Motors.
◆ RomiMotor()
| RomiMotor::RomiMotor |
( |
GPIO_TypeDef * | enPort, |
|
|
uint16_t | enPin, |
|
|
GPIO_TypeDef * | phPort, |
|
|
uint16_t | phPin, |
|
|
GPIO_TypeDef * | slPort, |
|
|
uint16_t | slPin ) |
Construction for the ROMI Motor Class.
◆ disable()
| void RomiMotor::disable |
( |
| ) |
|
Function disables the motor to no longer respond to pwm signals.
- Returns
- None
◆ enable()
| void RomiMotor::enable |
( |
| ) |
|
Function Enables the motor to operate based on the PWM.
- Returns
- None
◆ getDuty()
| int8_t RomiMotor::getDuty |
( |
| ) |
|
Function allows the user to get the current duty.
- Returns
- int8_t
◆ setSpeed()
| void RomiMotor::setSpeed |
( |
int8_t | speed | ) |
|
Function Sets the Direction of the PWM Signal and changes direction based on the duty value.
- Parameters
-
| speed | Parameter that sets the Romi Motor speed ranging from -100 to 100 |
- Returns
- None
◆ updatePWM()
| void RomiMotor::updatePWM |
( |
| ) |
|
Function uses and internal timer to trigger PWM signals via this function through the use of the PWM/Duty Cycle Given.
- Returns
- None
◆ duty_Cycle
| int8_t RomiMotor::duty_Cycle |
|
private |
Private variable duty_cycle that sets the duty cycle that goes into the motor driver based from the setSpeed function
◆ en_Pin
| uint16_t RomiMotor::en_Pin |
|
private |
Private variable en_Pin that takes in the enable GPIO pin value
◆ en_Port
| GPIO_TypeDef* RomiMotor::en_Port |
|
private |
Private variable enPort that takes in the enable Port definition from the STM32 Config
◆ ph_Pin
| uint16_t RomiMotor::ph_Pin |
|
private |
Private variable ph_Pin that takes in the Phase GPIO pin value
◆ ph_Port
| GPIO_TypeDef* RomiMotor::ph_Port |
|
private |
Private variable ph_Port that takes in the phase Port definition from the STM32 Config
◆ pwm_Counter
| uint8_t RomiMotor::pwm_Counter |
|
private |
Private variable pwm_Counter that helps set the requested duty cycle utilizing Timer 5 to set the en_Pin high and low.
◆ sl_Pin
| uint16_t RomiMotor::sl_Pin |
|
private |
Private variable sl_Pin that takes in the Sleep GPIO pin value
◆ sl_Port
| GPIO_TypeDef* RomiMotor::sl_Port |
|
private |
Private variable sl_Port that takes in the Sleep Port definition from the STM32 Config
The documentation for this class was generated from the following files:
- C:/Users/arath/OneDrive/Documents/ME 507/Project-WALLE/Code/Inc/romiMotor.h
- C:/Users/arath/OneDrive/Documents/ME 507/Project-WALLE/Code/src/romiMotor.cpp