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.
Dependencies: Encoder MODSERIAL mbed
Fork of Begintotaalscript by
Revision 0:e9e50c0a6502, committed 2013-10-31
- Comitter:
- Esther
- Date:
- Thu Oct 31 14:10:59 2013 +0000
- Child:
- 1:8a0a39740897
- Commit message:
- begin
Changed in this revision
--- /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
