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@27:688409727452, 2014-03-14 (annotated)
- Committer:
- sswatek
- Date:
- Fri Mar 14 02:13:10 2014 +0000
- Revision:
- 27:688409727452
- Parent:
- 26:ade7c813538f
- Child:
- 37:38a4ad49343e
Function added to find rigs and breaking out into functions
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" |
| soonerbot | 1:c28fac16a109 | 20 | |
| soonerbot | 1:c28fac16a109 | 21 | class robot{ |
| sswatek | 26:ade7c813538f | 22 | private: |
| sswatek | 26:ade7c813538f | 23 | Timer stepTimer; |
| sswatek | 27:688409727452 | 24 | int cameraMode; |
| soonerbot | 1:c28fac16a109 | 25 | public: |
| soonerbot | 1:c28fac16a109 | 26 | SPI spi; |
| soonerbot | 1:c28fac16a109 | 27 | remoteEnc bigenc; |
| soonerbot | 3:a223b0bf8256 | 28 | gyroReader gyro; |
| soonerbot | 15:b10859606504 | 29 | //remoteMotor right; |
| soonerbot | 15:b10859606504 | 30 | //remoteMotor left; |
| soonerbot | 9:aff48e331147 | 31 | absMotors motors; |
| soonerbot | 14:a30aa3b29a2e | 32 | hcsr04 pingLeft; |
| sswatek | 17:e247d58d9f42 | 33 | droidBT BTLink; |
| soonerbot | 1:c28fac16a109 | 34 | robot(); |
| soonerbot | 1:c28fac16a109 | 35 | double x,y,rot; |
| sswatek | 26:ade7c813538f | 36 | int circleX,circleY,rectX,rectY,rectRot,triX,triY,triRot; |
| sswatek | 27:688409727452 | 37 | int flameLocation; |
| soonerbot | 10:926f142f16a3 | 38 | int absDriveForward(double angle, int dist); |
| soonerbot | 13:c2d14bf733a5 | 39 | int smoothMove(int distance, int rotate, int maxSpeed); |
| soonerbot | 4:adc885f4ab75 | 40 | int driveForward(double angle, int dist); |
| soonerbot | 4:adc885f4ab75 | 41 | void addforward(double dist); |
| soonerbot | 1:c28fac16a109 | 42 | double turn(double power, double degrees); |
| soonerbot | 1:c28fac16a109 | 43 | int moveTo(double xInches, double yInches); |
| soonerbot | 1:c28fac16a109 | 44 | int turntowards(double xInches, double yInches); |
| sswatek | 27:688409727452 | 45 | int switchCameraMode(int mode); |
| sswatek | 27:688409727452 | 46 | int shapeCheck(); |
| sswatek | 26:ade7c813538f | 47 | int pollForShapes(); |
| sswatek | 27:688409727452 | 48 | int rigCheck(); |
| sswatek | 27:688409727452 | 49 | int pollForRigs(); |
| soonerbot | 1:c28fac16a109 | 50 | }; |
| soonerbot | 1:c28fac16a109 | 51 | |
| soonerbot | 1:c28fac16a109 | 52 | #endif |
