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.
Diff: robot.h
- Revision:
- 20:f0ca65974329
- Parent:
- 0:9f058fe8cab5
- Child:
- 21:18b585a44155
--- a/robot.h Wed Jul 22 22:00:05 2015 +0000 +++ b/robot.h Mon Jul 27 21:57:37 2015 +0000 @@ -7,11 +7,6 @@ #define ERROR 1 #define OK 0 -//PID gains -#define P_TERM 1.5 -#define I_TERM 0.01 -#define D_TERM 20 - //max/min speed #define MAX 0.25 #define MIN 0.1 @@ -26,4 +21,25 @@ DigitalOut led3(LED3); DigitalOut led4(LED4); -m3pi pi; \ No newline at end of file +m3pi pi; + +int mode; +#define MANUAL_MODE 0 +#define LINE_FOLLOW_MODE 1 + +volatile double leftspeed; +volatile double rightspeed; + +char received[80]; +int r_index; +int sensors[5]; + +// GAINS +////////////////////////////// +float k_p = 1.5; +float k_i = 0.0; +float k_d = 0.0; +////////////////////////////// + +Ticker communication; +Ticker controls;