Sascha Krüger
/
if_esle_abfrage
FET10 if else Abfrage
main.cpp
- Committer:
- wango
- Date:
- 2012-09-22
- Revision:
- 0:4aa802fdf78e
File content as of revision 0:4aa802fdf78e:
#include "mbed.h" DigitalIn taster(p20); // Deklaration des tasters auf pin 10 DigitalIn taster2(p19); DigitalOut LED (LED1); DigitalOut Led2(LED2); DigitalOut Led4 (LED4); Serial pc(USBTX, USBRX); // Serielle Schnittstelle int main() { while(1) { if (taster==1){ LED=1;} else{ LED=0; } if(taster2==1){ Led2=1; } else{ Led2=0; } if(taster==1&&taster2==1) { Led4=1; } else { Led4=0; } }}