![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
exercise 1
Revision 1:211adb1a2b53, committed 2020-10-06
- Comitter:
- happy_alien
- Date:
- Tue Oct 06 15:58:17 2020 +0000
- Parent:
- 0:01aa441bf296
- Commit message:
- Class excercise 1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 01aa441bf296 -r 211adb1a2b53 main.cpp --- a/main.cpp Mon Nov 25 18:14:24 2019 +0000 +++ b/main.cpp Tue Oct 06 15:58:17 2020 +0000 @@ -1,15 +1,37 @@ + #include "mbed.h" -DigitalOut led1(LED1),led2(LED2),led3(LED3),led4(LED4); +void printStatus(void); + +class MyClass +{ +public: + MyClass(double messwert):_messwert(messwert) + { + + } + + void printStatus(){ + printf("Status is now: %f\n", _messwert); +} -int main() { - while(1) { - led1=!led1; - led2=!led2; - led3=!led3; - led4=!led4; - - - wait_ms(500); +private: + double _messwert; +}; + +MyClass messwert(0.0); + + + + + +int main() +{ + while (1) { + + messwert.printStatus(); + wait_ms(500); + + } }