RobotCore
Robot Core Documentation
Public Member Functions | List of all members
robotCore.PWMMotor Class Reference

The PWMMotor class is used to control a motor that requires PWM and direction signals. More...

Inheritance diagram for robotCore.PWMMotor:
robotCore.SmartMotor robotCore.MotorBase

Public Member Functions

 PWMMotor (int pwmPin, int dirPin)
 
 PWMMotor (int pwmPin, int dirPin, int i2cAddr)
 
- Public Member Functions inherited from robotCore.SmartMotor
 SmartMotor (SmartMotorType type, int pwmPin, int dirPin)
 
 SmartMotor (SmartMotorType type, int pwmPin, int dirPin, int i2cAddr)
 
 SmartMotor (int pin, int min, int zero, int max)
 
 SmartMotor (int pin, int min, int zero, int max, int i2cAddr)
 
void setMaxSpeed (double maxSpeed)
 
void set (double value)
 
void setFeedbackDevice (Encoder encoder)
 
Encoder getFeedbackDevice ()
 
void setControlMode (SmartMotorMode mode)
 
void setFTerm (double f)
 
void setITerm (double i)
 
void setPTerm (double p)
 
void setIZone (double z)
 
void setInverted (boolean invert)
 
void disable ()
 
void enable ()
 

Detailed Description

The PWMMotor class is used to control a motor that requires PWM and direction signals.

Author
John Gaby

Controls a motor which requires two inputs. One of the inputs is a PWM (Pulse Width Modulation) signal which controls the speed of the motor while the second input controls the direction.

Constructor & Destructor Documentation

◆ PWMMotor() [1/2]

robotCore.PWMMotor.PWMMotor ( int  pwmPin,
int  dirPin 
)
Parameters
pwmPin- Specifies the Arduino PWM pin for the motor.
dirPin- Specifies the Arduino direction pin for the motor.

◆ PWMMotor() [2/2]

robotCore.PWMMotor.PWMMotor ( int  pwmPin,
int  dirPin,
int  i2cAddr 
)
Parameters
pwmPin- Specifies the Arduino PWM pin for the motor.
dirPin- Specifies the Arduino direction pin for the motor.
i2cAddr- Specifies the i2c address of the Arduino controlling the motor

The documentation for this class was generated from the following file: