Gerjan Wolterink / Mbed 2 deprecated Broncode_robot_groep2

Dependencies:   Encoder MODSERIAL mbed

Fork of Begintotaalscript by Esther Keulers

Files at this revision

API Documentation at this revision

Comitter:
Esther
Date:
Thu Oct 31 14:10:59 2013 +0000
Child:
1:8a0a39740897
Commit message:
begin

Changed in this revision

MODSERIAL.lib Show annotated file Show diff for this revision Revisions of this file
begintotaalscript.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MODSERIAL.lib	Thu Oct 31 14:10:59 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Sissors/code/MODSERIAL/#b04ce87dc424
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/begintotaalscript.cpp	Thu Oct 31 14:10:59 2013 +0000
@@ -0,0 +1,57 @@
+#include "mbed.h"
+#include "MODSERIAL.h"
+
+
+int main()
+{
+
+    MODSERIAL pc(USBTX,USBRX,64,1024);
+    pc.baud(115200);
+
+
+    DigitalIn knop1(PTC2);
+    DigitalIn knop2(PTB3);
+    DigitalIn knop3(PTB2);
+
+    knop1.mode(PullUp);
+    knop2.mode(PullUp);
+    knop3.mode(PullUp);
+
+    int state = 1;
+
+    while (true) {
+
+        if (state == 1)
+            pc.printf("state 1 rust| 1=cal motor 2=cal emg 3=tekenen /n/r");
+
+        if (knop1 == false ) {
+            state=2;
+            wait(0.05);
+        }
+
+        if (knop2 == false ) {
+            state=3;
+            wait(0.05);
+        }
+        if (knop3 == false ) {
+            state=6;
+            wait(0.05);
+        }
+        
+
+
+
+        if (state == 2)
+            pc.printf("state 2 cal robot| 2= rust /n/r");
+        if (state == 3)
+            pc.printf("state 3 cal EMG | 1=cal emg laag 3=cal emg hoog /n/r");
+        //if (state == 4)
+          //  pc.printf("state 1 | 1=cal motor 2=cal emg 3=tekenen /n/r");
+        //if (state == 5)
+          //  pc.printf("state 1 | 1=cal motor 2=cal emg 3=tekenen /n/r");
+        if (state == 6)
+            pc.printf("state 6 tekenen| 6=rust /n/r");
+
+    } //sluiten oneindige while loop
+
+}//afsluiten main
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 31 14:10:59 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file