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
- Committer:
- soonerbot
- Date:
- 2014-03-07
- Revision:
- 14:a30aa3b29a2e
- Parent:
- 13:c2d14bf733a5
- Child:
- 15:b10859606504
File content as of revision 14:a30aa3b29a2e:
/*
* File: lowPlan.h
* Author: Shawn Swatek
* Originated: Spring 2013
* Revised: 3/29/13
*/
#ifndef __ROBOT__
#define __ROBOT__
#include "mbed.h"
#include "dbgprint.h"
#include "gyroReader.h"
#include "remoteEnc.h"
#include "remoteMotor.h"
#include "absMotors.h"
#include "hcsr04.h"
class robot{
public:
SPI spi;
remoteEnc bigenc;
gyroReader gyro;
remoteMotor right;
remoteMotor left;
absMotors motors;
hcsr04 pingLeft;
robot();
double x,y,rot;
double pfac,ifac,dfac;
double angfac;
int absDriveForward(double angle, int dist);
int smoothMove(int distance, int rotate, int maxSpeed);
int driveForward(double angle, int dist);
void addforward(double dist);
double turn(double power, double degrees);
int moveTo(double xInches, double yInches);
int turntowards(double xInches, double yInches);
};
#endif
