ME 305
Functions
task_motor.py File Reference

Directly interfaces with motors. More...

Functions

def task_motor.taskMotor (taskname, period, motor_drv, mFlag, MFlag, duty, eFlag, mode)
 Task that is in charge of any alterations to drivers or motors. More...
 

Detailed Description

Directly interfaces with motors.

Task file to set duty cycle of motor 1 or motor 2. Interfaces with driver.py driver file to interact with the motor. Contains logic to ensure there are no improper duty cycle inputs.

Author
Ryan Dean
Zachary Hendrix
Date
2/17/2022

Function Documentation

◆ taskMotor()

def task_motor.taskMotor (   taskname,
  period,
  motor_drv,
  mFlag,
  MFlag,
  duty,
  eFlag,
  mode 
)

Task that is in charge of any alterations to drivers or motors.

This task sets the duty cycle for both mototr as well as enables driver to allow said motors to operate

Parameters
tasknameThe name of the task
periodThis task is designed to work cooperatively with other tasks. The period is how long it should take for the code to circle back and do this task
motor_drvThe motor driver name, used to refernce the motors being used in this task
mFlagA flag that is active when the m button was pressed in task user.
MFlagA flag that is active when the M button was pressed in task user. Holds True or False value dependinf the input from the user in task_user.py. initiates the input duty cycle to motor2
dutyA shared variable that hold the duty cycle value for either motor in the driver
eFlagA flag that is active when the e button was pressed in task user. Used to tell this task to enable the driver.