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@14:a30aa3b29a2e, 2014-03-07 (annotated)
- Committer:
- soonerbot
- Date:
- Fri Mar 07 21:49:22 2014 +0000
- Revision:
- 14:a30aa3b29a2e
- Parent:
- 13:c2d14bf733a5
- Child:
- 15:b10859606504
ultrasonic development
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 | 1:c28fac16a109 | 18 | |
| soonerbot | 1:c28fac16a109 | 19 | class robot{ |
| soonerbot | 1:c28fac16a109 | 20 | public: |
| soonerbot | 1:c28fac16a109 | 21 | SPI spi; |
| soonerbot | 1:c28fac16a109 | 22 | remoteEnc bigenc; |
| soonerbot | 3:a223b0bf8256 | 23 | gyroReader gyro; |
| soonerbot | 1:c28fac16a109 | 24 | remoteMotor right; |
| soonerbot | 1:c28fac16a109 | 25 | remoteMotor left; |
| soonerbot | 9:aff48e331147 | 26 | absMotors motors; |
| soonerbot | 14:a30aa3b29a2e | 27 | hcsr04 pingLeft; |
| soonerbot | 1:c28fac16a109 | 28 | robot(); |
| soonerbot | 1:c28fac16a109 | 29 | double x,y,rot; |
| soonerbot | 4:adc885f4ab75 | 30 | double pfac,ifac,dfac; |
| soonerbot | 4:adc885f4ab75 | 31 | double angfac; |
| soonerbot | 10:926f142f16a3 | 32 | int absDriveForward(double angle, int dist); |
| soonerbot | 13:c2d14bf733a5 | 33 | int smoothMove(int distance, int rotate, int maxSpeed); |
| soonerbot | 4:adc885f4ab75 | 34 | int driveForward(double angle, int dist); |
| soonerbot | 4:adc885f4ab75 | 35 | void addforward(double dist); |
| soonerbot | 1:c28fac16a109 | 36 | double turn(double power, double degrees); |
| soonerbot | 1:c28fac16a109 | 37 | int moveTo(double xInches, double yInches); |
| soonerbot | 1:c28fac16a109 | 38 | int turntowards(double xInches, double yInches); |
| soonerbot | 1:c28fac16a109 | 39 | }; |
| soonerbot | 1:c28fac16a109 | 40 | |
| soonerbot | 1:c28fac16a109 | 41 | #endif |
