cagdas d
/
_uebung_demirtas_06102020
first commit
Diff: main.cpp
- Revision:
- 1:0ab6ec2cda59
- Parent:
- 0:8217b9bfb66a
- Child:
- 2:65f24e5a3ce4
--- a/main.cpp Tue Oct 06 15:38:04 2020 +0000 +++ b/main.cpp Tue Oct 06 15:59:02 2020 +0000 @@ -1,14 +1,22 @@ #include "mbed.h" #include "MyClass.h" +#include "MyClassA.h" DigitalOut led(LED1); + int main() { MyClass element1 (23.2); MyClass element2; + + MyClassA element_A_1(42, false); + MyClassA element_A_2; + while (1) { led = !led; printf("Blink! LED is now %d\n", led.read()); printf("element1 messwert: %lf, element2 messwert: %lf \n", element1.get_wert(), element2.get_wert()); + printf("element_A_1 x: %d, element_A_2 x: %d \n", element_A_1.getX(), element_A_2.getX()); + printf("element_A_1 wahr: %s, element_A_2 x: %s \n", element_A_1.getWahr() ? "wahr" : "false", element_A_2.getWahr() ? "wahr": "false"); wait_ms(500); } - +}