Motor
Fork of Motor by
motor.h
- Committer:
- Reiko
- Date:
- 2013-07-29
- Revision:
- 0:5cafacc2a607
- Child:
- 1:c97f8bcd6c0f
File content as of revision 0:5cafacc2a607:
#ifndef MOTOR_H #define MOTOR_H #include "mbed.h" class Motor { public: Motor(PinName PWMpin, PinName dir1Pin, PinName dir2Pin); void setSpeed(int newSpeed); int getSpeed(); private: void pid(); InterruptIn interruptA; InterruptIn interruptB; volatile int pulses; int prevState; int currState; }; #endif