DigitaIn Example

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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
--- 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
+}
+