Terrabots / Mbed 2 deprecated DUMP_TRUCK_V3

Dependencies:   mbed

Revision:
0:2fc8a427dbcf
Child:
1:92832cd0e8c3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DumpTruck.h	Tue Oct 25 19:22:38 2016 +0000
@@ -0,0 +1,40 @@
+#ifndef MBED_DUMP_TRUCK_H
+#define MBED_DUMP_TRUCK_H
+ 
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+
+class DumpTruck {
+public:
+    DumpTruck(int truckId);
+    void drive(); // Drive DC motors with a desired motor speed and distance
+    void RotateTo();
+    void BedDown();
+    void BedUp();   
+    void raiseTo();
+    void LowerBed();
+    void stop();
+    
+    
+protected:
+    getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this
+    getPivotAngle(double PivotAngle); //Get data from potentiometer
+    SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor
+    SetBedSpeed(); //Set arbitrary rotation of DC Motor
+    float speed;
+    float distance;
+    float setTruckSpeed(); // set user inputed truck speed
+    float setTruckDistance(); //get user input for desired distance to be traveled
+    bool GetBedUpperSwitch(bool SwitchState);
+    bool GetBedLowerSwitch(bool SwitchState);
+    bool SwitchState;
+    float distance; //desired distance to have the robot drive
+    float speed; //value between 0 and 1 times the full speed of the robot
+    float DesiredAngle; 
+    float PivotSpeed; 
+    int truckNumber;
+    bool isCalibrated;
+};
+
+#endif
\ No newline at end of file