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

Dependencies:   mbed

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

Committer:
stefan1691
Date:
Sat Feb 21 05:37:05 2015 +0000
Revision:
1:4ef719bf702c
Parent:
0:531fa4200009
Child:
2:83598aa88c56
Kommentar verallgemeinert

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 1:4ef719bf702c 6 DigitalIn button1( PTC9 ); // 1. Button 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 }