Sascha Krüger / Mbed 2 deprecated LED_mit_2_Tastern_ein_bzw_ausschalten

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
wango
Date:
Sat Jun 25 11:34:51 2011 +0000
Commit message:
FET10

Changed in this revision

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 a7fedb08e90d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jun 25 11:34:51 2011 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+DigitalIn Taster(p20); // Deklaration des tasters auf pin 10
+DigitalIn taster2(p19);
+
+DigitalOut LED (LED1);
+Serial pc(USBTX, USBRX); // Serielle Schnittstelle
+ 
+int main()
+ {
+    while(1) 
+    {
+    if (Taster)     // wenn Taster = 1 dann 
+    {
+
+LED = 1; // Hallo Welt
+wait_ms(1);  // Warte 1 Sekunde und wenn dann immer noch p10 = 1 ist, dann schreibe wieder Hallo Welt
+ 
+}
+if (taster2)
+{
+
+LED = 0;
+wait_ms(1);
+}
+}
+}
diff -r 000000000000 -r a7fedb08e90d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jun 25 11:34:51 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912