cagdas d
/
_uebung_demirtas_06102020
first commit
main.cpp@1:0ab6ec2cda59, 2020-10-06 (annotated)
- Committer:
- kafka
- Date:
- Tue Oct 06 15:59:02 2020 +0000
- Revision:
- 1:0ab6ec2cda59
- Parent:
- 0:8217b9bfb66a
- Child:
- 2:65f24e5a3ce4
2. commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kafka | 0:8217b9bfb66a | 1 | #include "mbed.h" |
kafka | 0:8217b9bfb66a | 2 | #include "MyClass.h" |
kafka | 1:0ab6ec2cda59 | 3 | #include "MyClassA.h" |
kafka | 0:8217b9bfb66a | 4 | |
kafka | 0:8217b9bfb66a | 5 | DigitalOut led(LED1); |
kafka | 1:0ab6ec2cda59 | 6 | |
kafka | 0:8217b9bfb66a | 7 | int main() { |
kafka | 0:8217b9bfb66a | 8 | MyClass element1 (23.2); |
kafka | 0:8217b9bfb66a | 9 | MyClass element2; |
kafka | 1:0ab6ec2cda59 | 10 | |
kafka | 1:0ab6ec2cda59 | 11 | MyClassA element_A_1(42, false); |
kafka | 1:0ab6ec2cda59 | 12 | MyClassA element_A_2; |
kafka | 1:0ab6ec2cda59 | 13 | |
kafka | 0:8217b9bfb66a | 14 | while (1) { |
kafka | 0:8217b9bfb66a | 15 | led = !led; |
kafka | 0:8217b9bfb66a | 16 | printf("Blink! LED is now %d\n", led.read()); |
kafka | 0:8217b9bfb66a | 17 | printf("element1 messwert: %lf, element2 messwert: %lf \n", element1.get_wert(), element2.get_wert()); |
kafka | 1:0ab6ec2cda59 | 18 | printf("element_A_1 x: %d, element_A_2 x: %d \n", element_A_1.getX(), element_A_2.getX()); |
kafka | 1:0ab6ec2cda59 | 19 | printf("element_A_1 wahr: %s, element_A_2 x: %s \n", element_A_1.getWahr() ? "wahr" : "false", element_A_2.getWahr() ? "wahr": "false"); |
kafka | 0:8217b9bfb66a | 20 | wait_ms(500); |
kafka | 0:8217b9bfb66a | 21 | } |
kafka | 1:0ab6ec2cda59 | 22 | } |