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.
main.cpp
- Committer:
- Nishii
- Date:
- 2014-03-05
- Revision:
- 0:ae5d19a716e1
File content as of revision 0:ae5d19a716e1:
/* main.cpp */
/**
* Includes
*/
#include "mbed.h"
#include "QEI.h"
#include "global.h"
/**
* main
*/
int main() {
char c;
//default value
mortar_A.period_us(50);
mortar_A = STOP;
mortar_U = STOP;
mortar_M = STOP;
mortar_S = STOP;
UFO = CLOSE;
RISE1 = RISE2 = RISE3 = DOWN;
MS_A.mode(PullUp);
MS_U.mode(PullUp);
MS_M.mode(PullUp);
MS_S.mode(PullUp);
pc.putc('I'); //Initialize PC program
wait(0.5);
AUTO();
pc.printf( "\r\n" );
wait(0.2);
while(1) {
c = pc.getc();
switch(c) {
case 'A':
AUTO();
break;
case 'M':
MANUAL();
break;
case 'S':
SEMIAUTO();
break;
}
pc.printf( "\r\n" );
wait(0.2);
}
}