These are the core files for the Robot at Team conception.

Dependencies:   mbed UniServ

Revision:
15:4efc66de795a
Parent:
8:351b0b7b05b2
Child:
17:ec52258b9472
--- a/Brobot.h	Mon May 29 13:10:00 2017 +0000
+++ b/Brobot.h	Mon Jun 05 07:56:08 2017 +0000
@@ -9,6 +9,10 @@
 #include <cstdlib>
 #include <mbed.h>
 #include "SpeedControl.h"
+#include "PID_Control.h"
+#include "IRSensor.h"
+#include "Pixy.h"
+#include "UniServ.h"
 
 /**
  * This is a device driver class to drive the robot autonomously
@@ -18,24 +22,43 @@
 
 public:
     // constructors have same name as the class
-    Brobot(SpeedControl* speedctrl, int number);
-    //Brobot();  //empty constructor
-    
+    Brobot(SpeedControl& speedctrl, AnalogIn& distance, DigitalOut& enable, DigitalOut& bit0, DigitalOut& bit1, DigitalOut& bit2, DigitalOut* leds, Pixy& pixy, UniServ& servo);
 
- //   void        init(PwmOut* left, PwmOut* right, int number);
-    void        turnleft();
-    void        turnright();
+    void        avoidObstacleAndMove(int vtrans);
+    void        startLeds();
+    void        ledShow();
+    void        ledDistance();
     void        forward();
     void        back();
     void        stop();
-    void        slow(float ammount);  // ammount is subtracted from current speeds
-    void        rotate(float ammount); // values from -0.5 to 0.5
+    void        rotate(int ammount); //
+    void        approachBrick();
+    bool        approachHome();
+    void        closeGrip();
+    void        openGrip();
+    bool        foundGreenBrick();
+    bool        foundHome();
     
+
 private:
-    PwmOut*     pwmL;
-    PwmOut*     pwmR;
-    int         number;
-    SpeedControl* speedctrl;
+
+    SpeedControl& speedctrl;
+    AnalogIn& distance;
+    DigitalOut& enable;
+    DigitalOut& bit0;
+    DigitalOut& bit1;
+    DigitalOut& bit2;
+    IRSensor sensor_front; // uses the default constructor because no arguments given
+    IRSensor sensor_left;
+    IRSensor sensor_right;
+    DigitalOut* leds;  //0 to 5
+    IRSensor sensors[6];
+    Ticker t1;
+    PID_Control pid;
+    PID_Control pixypid;
+    Pixy& pixy;
+    UniServ& servo;
+
 };
 
 #endif /* BROBOT_H_ */