Dependencies:   mbed SimpleLib

Files at this revision

API Documentation at this revision

Comitter:
wango
Date:
Sat May 14 07:47:43 2011 +0000
Commit message:

Changed in this revision

SimpleLib.lib Show annotated file Show diff for this revision Revisions of this file
main.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
diff -r 000000000000 -r 6e7bac1b8bcd SimpleLib.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SimpleLib.lib	Sat May 14 07:47:43 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Alkorin/code/SimpleLib/#ce11d7ff88af
diff -r 000000000000 -r 6e7bac1b8bcd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat May 14 07:47:43 2011 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+
+
+ Serial pc(USBTX, USBRX);
+ 
+ Timer timer;  
+void DecodeInput(char input); 
+
+int main()                             
+ {
+ 
+    char input = 'Z';
+    pc.printf("Willkommen bei STOPPUHR\r\n");              
+    pc.printf("\r\n");
+    pc.printf("\r\n");
+    pc.printf("\r\n");
+    pc.printf("\r\n");
+    
+    pc.printf("Starte die Uhr mit:                 1\r\n");
+    pc.printf("Stoppe deine Zwischenzeit mit:      2\r\n");
+    pc.printf("Resete die Uhr mit:                 3\r\n");
+    
+     pc.printf("\r\n");
+    pc.printf("\r\n");
+    
+  while(1){
+        input = pc.getc();                                     //Benutzer Eingaben              
+        DecodeInput(input);  
+  }
+  }
+  void DecodeInput(char input)
+  
+{
+  switch(input)
+    {
+    
+        case '1': timer.start();
+                   pc.printf("Starte deine Stoppuhr bei:%f Sekunden\r\n\n", timer.read());                
+                    break;                              
+        case '2': 
+                   timer.stop();     
+                   pc.printf("Deine Zeit: %f Sekunden\r\n\n", timer.read());
+                   timer.start();
+                   break;  
+                 
+        case '3':  timer.reset();
+                   pc.printf("Die Stoppuhr wurde resetet\n\n\r");
+}
+}
diff -r 000000000000 -r 6e7bac1b8bcd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat May 14 07:47:43 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912