1 Uebung

Dependencies:   mbed

Revision:
1:851c54e0d307
Parent:
0:928e720c71da
Child:
2:3c3a6f0b11d2
--- a/main.cpp	Tue Oct 06 15:22:13 2020 +0000
+++ b/main.cpp	Tue Oct 06 15:42:29 2020 +0000
@@ -1,22 +1,25 @@
 #include "mbed.h"
-
-DigitalOut led(LED1);
-
+ 
 class MyClass{
 public:
     MyClass(double messwert) : _messwert(messwert) {
-        _messwert = 0;
     }
+    
+void status() {
+    printf("%f\n", _messwert);
+    
+}    
+ 
 private:
     double _messwert;
 };
-
-
+ 
+ 
+MyClass myclass(0);
+ 
 int main() {
-    while (1) {
-        led = !led;
-        printf("Blink! LED is now %d\n", led.read());
-
-        wait_ms(500);
-    }
-}
+  
+  myclass.status();
+  wait_ms(500);
+  
+}
\ No newline at end of file