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.
Revision 0:6e7bac1b8bcd, committed 2011-05-14
- Comitter:
- wango
- Date:
- Sat May 14 07:47:43 2011 +0000
- Commit message:
Changed in this revision
--- /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
--- /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"); +} +}
--- /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