![](/media/cache/group/Download_u2oFdPW.jpg.50x50_q85.jpg)
4.1 LED x Sekunden aufleuchten bei Tastendruck (if, wait)
Dependencies: mbed
main.cpp
- Committer:
- stefan1691
- Date:
- 2015-02-21
- Revision:
- 1:7f7f61c5830b
- Parent:
- 0:2f7686722076
- Child:
- 2:c10bfcff99ce
File content as of revision 1:7f7f61c5830b:
/** 4.1 LED x Sekunden aufleuchten bei Tastendruck (if, wait) */ #include "mbed.h" DigitalIn button1( PTC9, PullUp ); // 1. Taster auf thShield DigitalOut led( D10 ); // 1. LED auf thShield int main() { while ( true ) { if ( button1 == 0 ) // Button gedrueckt { led = 1; wait ( 3.0 ); led = 0; } } }