main.cpp: Sensoren einlesen und Motoren ansteuern

Dependencies:   mbed

Revision:
5:47262622a9bf
Parent:
4:e74c06e43485
--- a/Motion.h	Wed Apr 11 15:26:03 2018 +0000
+++ b/Motion.h	Mon Apr 16 12:44:48 2018 +0000
@@ -14,13 +14,16 @@
     
         Motion(Controller& controller, EncoderCounter& counterLeft,
                 EncoderCounter& counterRight, IRSensor& irSensorL,
-                IRSensor& irSensorC, IRSensor& irSensorR);
+                IRSensor& irSensorC, IRSensor& irSensorR, 
+                DigitalOut& enableMotorDriver);
         
         virtual ~Motion();
-        void    reverse();
         void    move();
         void    rotateL();
         void    rotateR();
+        void    stop();
+        void    rotate180();
+        void    test();
 
     private:
     
@@ -33,11 +36,14 @@
         IRSensor& irSensorL;
         IRSensor& irSensorC;
         IRSensor& irSensorR;
+        DigitalOut& enableMotorDriver;
         float distanceL;
         float distanceC;
         float distanceR;
-        short countsLeft;
-        short countsRight;
+        short countsL;
+        short countsR;
+        short countsLOld;
+        short countsROld;
     
     };