Motor is being implemented in this version. Trying to implement catching errors

Dependencies:   mbed Tracker

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DumpTruck.h Source File

DumpTruck.h

00001 #ifndef MBED_DUMP_TRUCK_H
00002 #define MBED_DUMP_TRUCK_H
00003  
00004 #include "mbed.h"
00005 
00006 class DumpTruck {
00007 public:
00008     DumpTruck(int truckId);
00009     void drive(); // Drive DC motors with a desired motor speed and distance
00010     void stop();
00011     void Calibrate();
00012     //void RotateTo();
00013     //void BedDown(); 
00014     //void BedUp();   
00015     //void raiseTo();
00016     //void LowerBed();
00017     
00018   
00019 protected:
00020     int truckNumber;
00021     float speed;                 // desired speed to drive the robot, a number between -1 and 1
00022     float distance;  
00023     float getDistance();            // input of desired distance to be traveled
00024     float setTruckSpeed();       // set truck speed
00025     float setTruckDistance();    // set distance to be traveled
00026     //getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this
00027     //getPivotAngle(double PivotAngle); //Get data from potentiometer
00028     //SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor
00029     //SetBedSpeed(); //Set arbitrary rotation of DC Motor
00030     //bool GetBedUpperSwitch(); //Checks if bed is all the way up
00031     //bool GetBedLowerSwitch(); //Checks if bed is all the way down
00032     //bool SwitchState; //Switch state variable for Up and down bed functions
00033     //float DesiredPivotAngle; // User Input of desired angle for the bed to be pivoted
00034     //float DesiredBedAngle; //User Input of desired bed angle to be raised.
00035     //float BedSpeed; //User input of desired speed for the dump truck's bed to rotate
00036     //float PivotSpeed; //User input of desired speed for the dump truck to pivot its back at
00037     
00038     //bool isCalibrated;// returns 0 and 1 to check if the robot has been calibrated
00039 };
00040 #endif