Spring 2014, ECE 4180 project, Georgia Institute of Technolgoy. This is the human driver (RF controller) program for the Robotics Cat and Mouse program.
Dependencies: ADXL345_I2C_NEST HMC6352 IMUfilter ITG3200_NEST USBHost mbed-rtos mbed
Fork of Project by
Diff: main.cpp
- Revision:
- 5:210cd333f770
- Parent:
- 4:b2a30c313297
- Child:
- 6:3fb9f96765f6
--- a/main.cpp Fri Apr 25 23:08:01 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -#include "mbed.h" -#include "RobotControl.h" -#include "rtos.h" - -#define ENTERCALIB 0x43 -#define EXITCALIB 0x45 - -DigitalOut led3(LED3); -DigitalOut led4(LED4); -DigitalOut rst1(p12); - -Serial xbee1(p13, p14); - -InterruptIn sw(p30); - -void StopISR() -{ - rightMotorPWM = 0; - leftMotorPWM = 0; - exit(1); -} - -int main() { - - //Emergency stop mechanism - sw.rise(&StopISR); - - // start positioning system - Thread position(PositionSystemMain, NULL, osPriorityNormal, 256 * 4); - wait(3); // wait for the mouse sensor to boot up - - // calibrate 90 degree turns - turnCalibrate(); - - // PTURN_RIGHT is the measured x value for a 90 degree turn - pc.printf("PTURN_RIGHT: %f\n\r", PTURN_RIGHT); - wait(1); - - // try a 90 degree turn with the measured PTURN_RIGHT value - turnRight(90); -} \ No newline at end of file