3. nur Zugewiesen bzw I2C erzeugt

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Hutzi
Date:
Tue Oct 06 17:08:06 2020 +0000
Parent:
4:0f310f0fa9ac
Commit message:
V3_nur zugewiesen und erzeugt

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 06 16:56:36 2020 +0000
+++ b/main.cpp	Tue Oct 06 17:08:06 2020 +0000
@@ -8,30 +8,20 @@
     
   
     public:
-        TestKlasse(int x, bool wahr) : _x(x), _wahr(wahr) {
-            _x=0;
-            _wahr=false;
-            }
-          
-      int getx(void) {
-          
-          return _x;
-          }
+        TestKlasse(PinName sda, PinName scl): _i2c(scl,sda){}
+         
+        float read(); 
       
     private:    
-        int _x;
-        bool _wahr;
+    I2C _i2c;
+    
 };
 
-
-TestKlasse ausgabe(15,true);
+TestKlasse i2c(p28,p27);
 
 int main() {
     
-    int y;
-    y=ausgabe.getx();
-    
-    printf("bei 15 passts: %d\n",y);
+    ausgabe.gibAus();
     
 }