Main repository for dump truck API development in Spring 2017
Dependencies: Tracker mbed MotorV2 SRF05 nRF24L01P
Fork of DUMP_TRUCK_TEST_V1 by
Activities
This Week
If needed, please contact Milo Pan at mpan9@gatech.edu for rights and access to this repository.
DumpTruck.h@0:6942f0e2198c, 2016-11-01 (annotated)
- Committer:
- Josahty
- Date:
- Tue Nov 01 20:13:57 2016 +0000
- Revision:
- 0:6942f0e2198c
- Child:
- 3:cd6e2d7c7c9c
DUMP_TRUCK V4 with commented areas
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Josahty | 0:6942f0e2198c | 1 | #ifndef MBED_DUMP_TRUCK_H |
Josahty | 0:6942f0e2198c | 2 | #define MBED_DUMP_TRUCK_H |
Josahty | 0:6942f0e2198c | 3 | |
Josahty | 0:6942f0e2198c | 4 | #include "mbed.h" |
Josahty | 0:6942f0e2198c | 5 | |
Josahty | 0:6942f0e2198c | 6 | class DumpTruck { |
Josahty | 0:6942f0e2198c | 7 | public: |
Josahty | 0:6942f0e2198c | 8 | DumpTruck(int truckId); |
Josahty | 0:6942f0e2198c | 9 | void drive(); // Drive DC motors with a desired motor speed and distance |
Josahty | 0:6942f0e2198c | 10 | void stop(); |
Josahty | 0:6942f0e2198c | 11 | void Calibrate(); |
Josahty | 0:6942f0e2198c | 12 | //void RotateTo(); |
Josahty | 0:6942f0e2198c | 13 | //void BedDown(); |
Josahty | 0:6942f0e2198c | 14 | //void BedUp(); |
Josahty | 0:6942f0e2198c | 15 | //void raiseTo(); |
Josahty | 0:6942f0e2198c | 16 | //void LowerBed(); |
Josahty | 0:6942f0e2198c | 17 | |
Josahty | 0:6942f0e2198c | 18 | protected: |
Josahty | 0:6942f0e2198c | 19 | int truckNumber; |
Josahty | 0:6942f0e2198c | 20 | float speed; // desired speed to drive the robot, a number between -1 and 1 |
Josahty | 0:6942f0e2198c | 21 | float distance; // input of desired distance to be traveled |
Josahty | 0:6942f0e2198c | 22 | float setTruckSpeed(); // set truck speed |
Josahty | 0:6942f0e2198c | 23 | float setTruckDistance(); // set distance to be traveled |
Josahty | 0:6942f0e2198c | 24 | //getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this |
Josahty | 0:6942f0e2198c | 25 | //getPivotAngle(double PivotAngle); //Get data from potentiometer |
Josahty | 0:6942f0e2198c | 26 | //SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor |
Josahty | 0:6942f0e2198c | 27 | //SetBedSpeed(); //Set arbitrary rotation of DC Motor |
Josahty | 0:6942f0e2198c | 28 | //bool GetBedUpperSwitch(); //Checks if bed is all the way up |
Josahty | 0:6942f0e2198c | 29 | //bool GetBedLowerSwitch(); //Checks if bed is all the way down |
Josahty | 0:6942f0e2198c | 30 | //bool SwitchState; //Switch state variable for Up and down bed functions |
Josahty | 0:6942f0e2198c | 31 | //float DesiredPivotAngle; // User Input of desired angle for the bed to be pivoted |
Josahty | 0:6942f0e2198c | 32 | //float DesiredBedAngle; //User Input of desired bed angle to be raised. |
Josahty | 0:6942f0e2198c | 33 | //float BedSpeed; //User input of desired speed for the dump truck's bed to rotate |
Josahty | 0:6942f0e2198c | 34 | //float PivotSpeed; //User input of desired speed for the dump truck to pivot its back at |
Josahty | 0:6942f0e2198c | 35 | |
Josahty | 0:6942f0e2198c | 36 | //bool isCalibrated;// returns 0 and 1 to check if the robot has been calibrated |
Josahty | 0:6942f0e2198c | 37 | }; |
Josahty | 0:6942f0e2198c | 38 | |
Josahty | 0:6942f0e2198c | 39 | #endif |