1 Uebung

Dependencies:   mbed

Committer:
rob117
Date:
Tue Oct 06 15:22:13 2020 +0000
Revision:
0:928e720c71da
Child:
1:851c54e0d307
1messwert

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rob117 0:928e720c71da 1 #include "mbed.h"
rob117 0:928e720c71da 2
rob117 0:928e720c71da 3 DigitalOut led(LED1);
rob117 0:928e720c71da 4
rob117 0:928e720c71da 5 class MyClass{
rob117 0:928e720c71da 6 public:
rob117 0:928e720c71da 7 MyClass(double messwert) : _messwert(messwert) {
rob117 0:928e720c71da 8 _messwert = 0;
rob117 0:928e720c71da 9 }
rob117 0:928e720c71da 10 private:
rob117 0:928e720c71da 11 double _messwert;
rob117 0:928e720c71da 12 };
rob117 0:928e720c71da 13
rob117 0:928e720c71da 14
rob117 0:928e720c71da 15 int main() {
rob117 0:928e720c71da 16 while (1) {
rob117 0:928e720c71da 17 led = !led;
rob117 0:928e720c71da 18 printf("Blink! LED is now %d\n", led.read());
rob117 0:928e720c71da 19
rob117 0:928e720c71da 20 wait_ms(500);
rob117 0:928e720c71da 21 }
rob117 0:928e720c71da 22 }