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@5:dc4cf6cc24b3, 2017-02-07 (annotated)
- Committer:
- simplyellow
- Date:
- Tue Feb 07 21:01:20 2017 +0000
- Revision:
- 5:dc4cf6cc24b3
- Parent:
- 3:cd6e2d7c7c9c
- Child:
- 6:5cc6a9b6f60e
- Child:
- 9:5a35e2a28a47
Dump Truck
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 | 3:cd6e2d7c7c9c | 17 | |
Josahty | 0:6942f0e2198c | 18 | |
Josahty | 0:6942f0e2198c | 19 | protected: |
Josahty | 0:6942f0e2198c | 20 | int truckNumber; |
Josahty | 0:6942f0e2198c | 21 | float speed; // desired speed to drive the robot, a number between -1 and 1 |
Josahty | 3:cd6e2d7c7c9c | 22 | float distance; |
Josahty | 3:cd6e2d7c7c9c | 23 | float getDistance(); // input of desired distance to be traveled |
Josahty | 0:6942f0e2198c | 24 | float setTruckSpeed(); // set truck speed |
Josahty | 0:6942f0e2198c | 25 | float setTruckDistance(); // set distance to be traveled |
Josahty | 0:6942f0e2198c | 26 | //getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this |
Josahty | 0:6942f0e2198c | 27 | //getPivotAngle(double PivotAngle); //Get data from potentiometer |
Josahty | 0:6942f0e2198c | 28 | //SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor |
Josahty | 0:6942f0e2198c | 29 | //SetBedSpeed(); //Set arbitrary rotation of DC Motor |
Josahty | 0:6942f0e2198c | 30 | //bool GetBedUpperSwitch(); //Checks if bed is all the way up |
Josahty | 0:6942f0e2198c | 31 | //bool GetBedLowerSwitch(); //Checks if bed is all the way down |
Josahty | 0:6942f0e2198c | 32 | //bool SwitchState; //Switch state variable for Up and down bed functions |
Josahty | 0:6942f0e2198c | 33 | //float DesiredPivotAngle; // User Input of desired angle for the bed to be pivoted |
Josahty | 0:6942f0e2198c | 34 | //float DesiredBedAngle; //User Input of desired bed angle to be raised. |
Josahty | 0:6942f0e2198c | 35 | //float BedSpeed; //User input of desired speed for the dump truck's bed to rotate |
Josahty | 0:6942f0e2198c | 36 | //float PivotSpeed; //User input of desired speed for the dump truck to pivot its back at |
Josahty | 0:6942f0e2198c | 37 | |
Josahty | 0:6942f0e2198c | 38 | //bool isCalibrated;// returns 0 and 1 to check if the robot has been calibrated |
Josahty | 0:6942f0e2198c | 39 | }; |
simplyellow | 5:dc4cf6cc24b3 | 40 | #endif |