Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 5:15aeb54a9126
- Parent:
- 4:0f310f0fa9ac
--- 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();
}