back to FEHMotor
Description
Library: FEHMotor.h
This object is used to control the four DC motor ports on the back of your Proteus controller. Once you have declared a variable of type FEHMotor and assigned it to one of the four motor ports, you will have access to all of the member functions associated with the FEHMotor object. Simply use the “dot” operator to access these member functions and control your DC motor attached to the respective motor port. If you plan to use multiple DC motors, you will need to create a variable of type FEHMotor for each motor you wish to control.
For information on port enumerations, see the Hardware section.
Member Functions
void SetPercent(float percent)
void Stop()
Declaration
FEHMotor <variable name>(FEHMotor::FEHMotorPort, float voltage);
Parameters
voltage: a float value representing the maximum rated voltage for your motor
Example
#include <FEHMotor.h> int main(void) { //declares a motor on motor port 0 that is rated for //7.2V (a Vex or a GMH for example) FEHMotor right_motor(FEHMotor::Motor0,7.2); }