TrekkingPhoenix / Mbed 2 deprecated TrekkingControllerV1-4_WinterChallenge20

Dependencies:   mbed mbed-rtos MotionSensor EthernetInterface

Revision:
12:273752f540be
Child:
20:7138ab2f93f7
diff -r 7f569811a5f1 -r 273752f540be Motor/Motor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motor/Motor.h	Sat Apr 30 21:23:13 2016 +0000
@@ -0,0 +1,31 @@
+#ifndef MOTOR_HEADER
+#define MOTOR_HEADER
+
+#include "mbed.h"
+#include "CarPWM.h"
+
+class Motor{
+    
+    protected:
+    Ticker interruption;
+    bool alternate_motor;
+    float velocity;
+    float jog_duty_cycle;
+    float jog_period;
+    PwmOut motor;
+
+public:
+    
+    void startJogging(float jog_dc, float jog_p);
+    void stopJogging(void);
+    void brakeMotor(void);
+    void reverseMotor(int speed);
+    void setVelocity(int new_velocity);
+    void setSmoothVelocity(int new_velocity);
+    Motor(): motor(PTD1){}
+    
+private:
+     void motorJogging(void);
+     
+};
+#endif
\ No newline at end of file