Franz Pucher
/
000_DigitalIn
DigitaIn Example
Revision 1:e92aff7a1cf0, committed 2019-11-25
- Comitter:
- fpucher
- Date:
- Mon Nov 25 18:12:11 2019 +0000
- Parent:
- 0:1b90d953ef92
- Commit message:
- Erstes Programm
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1b90d953ef92 -r e92aff7a1cf0 main.cpp --- a/main.cpp Wed Nov 13 13:52:25 2019 +0000 +++ b/main.cpp Mon Nov 25 18:12:11 2019 +0000 @@ -2,14 +2,15 @@ #include "mbed.h" // Flash an LED while a DigitalIn is true -DigitalIn enable(BUTTON1); +DigitalIn enable(A1); DigitalOut led(LED1); int main() { while(1) { - if(enable) { + if(!enable) { led = !led; } wait(0.25); } -} \ No newline at end of file +} +