WALL-E Version 1.0
The "WALL-E" Project is a ME 507 quarter term project inspired to recreate the robot WALL-E. The WALL-E robot is a fully 3D printed robot with modified components in order to fit the needs of the chosen peripherals and electronics. WALL-E contains a custom made PCB which is housed in the main body of WALL-E. WALL-E's peripherals and components include 2 pololu Romi Motors with encoders, 4 MG90s servos, BNO055 IMU, and a OV2640 ArduCam camera. The objective of WALL-E is to scan the surrounding area for the closest object to it. Once that object is detected, WALL-E drives up to the object, attempts to pick up or hold the object and detect the color of the object.
Loading...
Searching...
No Matches
RomiMotor Class Reference

WALL-E motor driver class that uses pololu Romi Motors. More...

#include <romiMotor.h>

Public Member Functions

 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.

Private Attributes

GPIO_TypeDef * en_Port
uint16_t en_Pin
GPIO_TypeDef * ph_Port
uint16_t ph_Pin
GPIO_TypeDef * sl_Port
uint16_t sl_Pin
int8_t duty_Cycle
uint8_t pwm_Counter

Detailed Description

WALL-E motor driver class that uses pololu Romi Motors.

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ 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
speedParameter 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

Member Data Documentation

◆ 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