Sets motor currents based on input motorvalue
Diff: motorConfig.h
- Revision:
- 0:131a76b8848a
- Child:
- 1:84cb991c4d28
diff -r 000000000000 -r 131a76b8848a motorConfig.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/motorConfig.h Tue Oct 17 09:51:50 2017 +0000 @@ -0,0 +1,25 @@ +#ifndef MOTORCONFIG_H +#define MOTORCONFIG_H + +#include "mbed.h" +#include "FastPWM.h" + +enum robotStates {KILLED, ACTIVE}; + +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 \ No newline at end of file