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: main.cpp
- Revision:
- 0:ae5d19a716e1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Mar 05 05:17:45 2014 +0000
@@ -0,0 +1,53 @@
+/* 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);
+ }
+}