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

Dependencies:   mbed

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

Committer:
stefan1691
Date:
Fri Feb 20 18:28:59 2015 +0000
Revision:
0:531fa4200009
Child:
1:4ef719bf702c
3.1 Neues Programm mittels Assistenten erstellen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
stefan1691 0:531fa4200009 1 /** 3.1 Neues Programm mittels Assistenten erstellen
stefan1691 0:531fa4200009 2 */
stefan1691 0:531fa4200009 3
stefan1691 0:531fa4200009 4 #include "mbed.h"
stefan1691 0:531fa4200009 5
stefan1691 0:531fa4200009 6 DigitalIn button1( PTC9 ); // 1. Taster auf thShield
stefan1691 0:531fa4200009 7 DigitalOut led( D10 ); // 1. LED auf thShield
stefan1691 0:531fa4200009 8
stefan1691 0:531fa4200009 9 int main()
stefan1691 0:531fa4200009 10 {
stefan1691 0:531fa4200009 11 while ( true )
stefan1691 0:531fa4200009 12 {
stefan1691 0:531fa4200009 13 if ( button1 == 0 ) // Button gedrueckt
stefan1691 0:531fa4200009 14 led = 1;
stefan1691 0:531fa4200009 15 else
stefan1691 0:531fa4200009 16 led = 0;
stefan1691 0:531fa4200009 17 }
stefan1691 0:531fa4200009 18 }