Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Revision:
0:f3bf6c7e2283
Child:
1:bbabbd997d21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/globals.h	Fri Apr 20 20:39:35 2012 +0000
@@ -0,0 +1,57 @@
+#ifndef GLOBALS_H
+#define GLOBALS_H
+
+#include "mbed.h"
+
+#define PI 3.14159265
+
+//Robot constants
+//const int encoderRevCount = 1856;
+//const int wheelmm = 314;
+//const int robotCircumference = 1256;
+
+//Robot constants in mm
+const int robot_width = 260;
+const int encoderRevCount = 360;
+const int wheelmm = 226;
+const int robotCircumference = 816;
+
+//Arena constants
+struct pos {
+    int x;
+    int y;
+};
+const pos beaconpos[] = {{3000, 1000},{0,0}, {0,2000}};
+
+//sonar constants
+static const float sonarvariance = 0.004;
+
+//High speed serial port
+extern Serial pc;
+
+//I2C mutex
+//extern Mutex i2c_rlock;
+//extern Mutex i2c_wlock;
+
+
+// IR angle calc
+#define RELI_BOUND_LOW          4
+#define RELI_BOUND_HIGH         25
+
+// Localization estimate torrelences
+#define POSITION_TOR            80
+#define ANGLE_TOR               0.15
+
+// motion control
+#define ROTA_SPEED              40
+#define MOVE_SPEED              50
+#define MAX_STEP_RATIO          0.10 //maximum change in the speed
+//#define TRACK_RATE              10       // +- rate for each wheel when tracking
+
+// Task suspend periods
+#define IR_TURRET_PERIOD        200
+#define MOTION_UPDATE_PERIOD    20
+
+
+
+#endif
\ No newline at end of file