smd.iotkit.ch / Mbed 2 deprecated 0-06-01-Uebung

Dependencies:   mbed

Fork of 06-01-Uebung by th.iotkit.ch

Revision:
0:531fa4200009
Child:
1:4ef719bf702c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 20 18:28:59 2015 +0000
@@ -0,0 +1,18 @@
+/** 3.1 Neues Programm mittels Assistenten erstellen
+*/
+
+#include "mbed.h"
+
+DigitalIn   button1( PTC9 );        // 1. Taster auf thShield   
+DigitalOut  led( D10 );             // 1. LED auf thShield
+
+int main()
+{
+    while ( true ) 
+    {
+        if  ( button1 == 0 )        // Button gedrueckt
+            led = 1;
+        else
+            led = 0;
+    }
+}
\ No newline at end of file