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.
robot.h
- Committer:
- zsunberg
- Date:
- 2015-07-27
- Revision:
- 20:f0ca65974329
- Parent:
- 0:9f058fe8cab5
- Child:
- 21:18b585a44155
File content as of revision 20:f0ca65974329:
#include <stdio.h> #include <stdlib.h> #include "mbed.h" #include "m3pi.h" #define BUF_SIZE 128 #define ERROR 1 #define OK 0 //max/min speed #define MAX 0.25 #define MIN 0.1 DigitalOut xbeeReset(p26); //reset on Xbee Serial pc(USBTX, USBRX); // tx, rx, interface with PC Serial xbee(p28, p27); //tx, rx, interface with xbee DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); 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;