1 Uebung

Dependencies:   mbed

Revision:
2:3c3a6f0b11d2
Parent:
1:851c54e0d307
Child:
3:dbd662e5f8f8
--- a/main.cpp	Tue Oct 06 15:42:29 2020 +0000
+++ b/main.cpp	Tue Oct 06 15:50:31 2020 +0000
@@ -1,25 +1,31 @@
 #include "mbed.h"
- 
-class MyClass{
+
+class MyClass
+{
 public:
-    MyClass(double messwert) : _messwert(messwert) {
+    MyClass(double messwert) : _messwert(messwert)      //Initialisierungsliste
+    {
     }
-    
-void status() {
-    printf("%f\n", _messwert);
-    
-}    
- 
+
+    void status()                                       //Funktion die den status von Messwert abfragt
+    {
+        printf("%f\n", _messwert);
+
+    }
+
 private:
     double _messwert;
 };
- 
- 
+
+
 MyClass myclass(0);
- 
-int main() {
-  
-  myclass.status();
-  wait_ms(500);
-  
-}
\ No newline at end of file
+
+int main()
+{
+    while(1) {
+
+        myclass.status();
+        wait_ms(500);
+    }
+}
+