Sets motor currents based on input motorvalue

motorConfig.h

Committer:
tvlogman
Date:
2017-10-22
Revision:
1:84cb991c4d28
Parent:
0:131a76b8848a
Child:
2:91ea2963629a

File content as of revision 1:84cb991c4d28:

#ifndef MOTORCONFIG_H
#define MOTORCONFIG_H

#include "mbed.h"
#include "FastPWM.h"

enum robotStates {KILLED, ACTIVE, CALIBRATE};

class motorConfig {
public:
    motorConfig(PinName, PinName, PinName, PinName, PinName);
    robotStates currentState;
    void setMotor(float motorValue);
    void turnMotorOn();
    void killSwitch();
    
private:
    DigitalOut ledG;
    DigitalOut ledR;
    DigitalOut ledB;
    
    DigitalOut directionPin; //D4
    PwmOut pwmPin; //D5
    };
#endif