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 06-01-Uebung by
main.cpp@0:531fa4200009, 2015-02-20 (annotated)
- 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?
| 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 | 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 | } |
