Michael Planner
/
InitListen
Codeschnippseln für diese Übung
Diff: main.cpp
- Revision:
- 0:76d9c940a794
- Child:
- 1:c65875995efb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 06 16:36:31 2020 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" + + +class MyClassB +{ + private: + I2C i2c; + float result; + + public: + MyClassB(PinName sda, PinName scl) : i2c(sda, scl) + { + result = 0; + } + float read(); +}; + +float MyClassB::read() { return result; } + + + +MyClassB sensor(p28, p27); + +int main() +{ + float x = sensor.read(); +} \ No newline at end of file