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.
Dependencies: mbed
Fork of 03-01-Uebung by
main.cpp@2:83598aa88c56, 2015-02-21 (annotated)
- Committer:
- stefan1691
- Date:
- Sat Feb 21 07:55:14 2015 +0000
- Revision:
- 2:83598aa88c56
- Parent:
- 1:4ef719bf702c
- Child:
- 3:6dfb04216698
PullUp
Who changed what in which revision?
| User | Revision | Line number | New 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 | 2:83598aa88c56 | 6 | DigitalIn button1( PTC9, PullUp ); // 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 | } | 
