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.
globals.h
00001 #ifndef GLOBALS_H 00002 #define GLOBALS_H 00003 00004 00005 #define ROBOT_PRIMARY 00006 00007 00008 #include "mbed.h" 00009 #define PI 3.14159265 00010 00011 //enables ui 00012 //#define UION 00013 00014 00015 00016 #ifdef ROBOT_PRIMARY 00017 // Primary defs go here 00018 #else 00019 // Secondary defs go here 00020 #endif 00021 00022 //Robot hardware parameters 00023 const int robotCircumference = 816; //mm (DUMMY!) 00024 00025 //Robot movement constants 00026 const float fwdvarperunit = 0.01; //1 std dev = 7% //NEEDS TO BE MEASURED AGAIN! 00027 const float varperang = 0.01; //around 1 degree stddev per 180 turn 00028 const float xyvarpertime = 0.0005; //(very poorly) accounts for hitting things 00029 const float angvarpertime = 0.001; 00030 00031 //sonar constants 00032 static const float sonarvariance = 0.005; 00033 00034 //IR constants 00035 static const float IRvariance = 0.001; 00036 00037 //Arena constants 00038 struct pos { 00039 int x; 00040 int y; 00041 }; 00042 00043 //beacon positions 00044 extern pos beaconpos[]; 00045 00046 //Colour 00047 extern bool Colour; // 1 for red, 0 for blue 00048 00049 //System constants 00050 const int PREDICTPERIOD = 20; //ms 00051 00052 //High speed serial port 00053 extern Serial pc; 00054 00055 00056 #endif
Generated on Tue Jul 12 2022 19:50:02 by
1.7.2