cleaned up motor class with separate header and .cpp files

Dependencies:   mbed

Dependents:   TerraBot_Drive_2D TerraBot_Drive_2D TerraBot_Drive_2D_FINAL DUMP_TRUCK_Test ... more

Motor.h

Committer:
simplyellow
Date:
2016-10-07
Revision:
0:0a5af2965205
Child:
2:7674afbf8e53

File content as of revision 0:0a5af2965205:

#ifndef MBED_FLASHER_H
#define MBED_FLASHER_H

#include "mbed.h"

class Motor {
    public:
        Motor(PinName pwm, PinName dir);
        void write(float Val);
        float read();
    private:
        PwmOut pwmPin;
        DigitalOut dirPin;
        float lastVal;
    
};

#endif