Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of IEEE_14_Freescale by
robot.h@44:4b933e7409e7, 2014-04-01 (annotated)
- Committer:
- sswatek
- Date:
- Tue Apr 01 02:16:35 2014 +0000
- Revision:
- 44:4b933e7409e7
- Parent:
- 43:f7ef0f5f980c
- Child:
- 48:519deb1d4dff
Added slow mode, procedure for grabbing, and procedure for aligning to rig
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| soonerbot | 1:c28fac16a109 | 1 | /* |
| soonerbot | 1:c28fac16a109 | 2 | * File: lowPlan.h |
| soonerbot | 1:c28fac16a109 | 3 | * Author: Shawn Swatek |
| soonerbot | 1:c28fac16a109 | 4 | * Originated: Spring 2013 |
| soonerbot | 1:c28fac16a109 | 5 | * Revised: 3/29/13 |
| soonerbot | 1:c28fac16a109 | 6 | */ |
| soonerbot | 1:c28fac16a109 | 7 | |
| soonerbot | 1:c28fac16a109 | 8 | #ifndef __ROBOT__ |
| soonerbot | 1:c28fac16a109 | 9 | #define __ROBOT__ |
| soonerbot | 1:c28fac16a109 | 10 | |
| soonerbot | 1:c28fac16a109 | 11 | #include "mbed.h" |
| soonerbot | 1:c28fac16a109 | 12 | #include "dbgprint.h" |
| soonerbot | 1:c28fac16a109 | 13 | #include "gyroReader.h" |
| soonerbot | 1:c28fac16a109 | 14 | #include "remoteEnc.h" |
| soonerbot | 1:c28fac16a109 | 15 | #include "remoteMotor.h" |
| soonerbot | 9:aff48e331147 | 16 | #include "absMotors.h" |
| soonerbot | 14:a30aa3b29a2e | 17 | #include "hcsr04.h" |
| soonerbot | 15:b10859606504 | 18 | #include "servo.h" |
| sswatek | 17:e247d58d9f42 | 19 | #include "droidBT.h" |
| sswatek | 43:f7ef0f5f980c | 20 | #include "absMotorControl.h" |
| soonerbot | 1:c28fac16a109 | 21 | |
| soonerbot | 1:c28fac16a109 | 22 | class robot{ |
| sswatek | 26:ade7c813538f | 23 | private: |
| sswatek | 26:ade7c813538f | 24 | Timer stepTimer; |
| sswatek | 27:688409727452 | 25 | int cameraMode; |
| soonerbot | 1:c28fac16a109 | 26 | public: |
| soonerbot | 1:c28fac16a109 | 27 | SPI spi; |
| soonerbot | 1:c28fac16a109 | 28 | remoteEnc bigenc; |
| soonerbot | 3:a223b0bf8256 | 29 | gyroReader gyro; |
| soonerbot | 15:b10859606504 | 30 | //remoteMotor right; |
| soonerbot | 15:b10859606504 | 31 | //remoteMotor left; |
| soonerbot | 9:aff48e331147 | 32 | absMotors motors; |
| soonerbot | 14:a30aa3b29a2e | 33 | hcsr04 pingLeft; |
| sswatek | 37:38a4ad49343e | 34 | hcsr04 pingRight; |
| sswatek | 17:e247d58d9f42 | 35 | droidBT BTLink; |
| sswatek | 43:f7ef0f5f980c | 36 | absMotorControl cont; |
| soonerbot | 1:c28fac16a109 | 37 | robot(); |
| soonerbot | 1:c28fac16a109 | 38 | double x,y,rot; |
| sswatek | 26:ade7c813538f | 39 | int circleX,circleY,rectX,rectY,rectRot,triX,triY,triRot; |
| sswatek | 27:688409727452 | 40 | int flameLocation; |
| soonerbot | 10:926f142f16a3 | 41 | int absDriveForward(double angle, int dist); |
| soonerbot | 13:c2d14bf733a5 | 42 | int smoothMove(int distance, int rotate, int maxSpeed); |
| soonerbot | 4:adc885f4ab75 | 43 | int driveForward(double angle, int dist); |
| soonerbot | 4:adc885f4ab75 | 44 | void addforward(double dist); |
| soonerbot | 1:c28fac16a109 | 45 | double turn(double power, double degrees); |
| soonerbot | 1:c28fac16a109 | 46 | int moveTo(double xInches, double yInches); |
| soonerbot | 1:c28fac16a109 | 47 | int turntowards(double xInches, double yInches); |
| sswatek | 27:688409727452 | 48 | int switchCameraMode(int mode); |
| sswatek | 27:688409727452 | 49 | int shapeCheck(); |
| sswatek | 26:ade7c813538f | 50 | int pollForShapes(); |
| sswatek | 27:688409727452 | 51 | int rigCheck(); |
| sswatek | 27:688409727452 | 52 | int pollForRigs(); |
| sswatek | 44:4b933e7409e7 | 53 | int nearRigCheck(); |
| sswatek | 44:4b933e7409e7 | 54 | int alignWithRig(); |
| soonerbot | 1:c28fac16a109 | 55 | }; |
| soonerbot | 1:c28fac16a109 | 56 | |
| soonerbot | 1:c28fac16a109 | 57 | #endif |
