Mirza Mesic
/
mbed_lektion1
855
main.cpp@0:da5f57a822a5, 2019-11-18 (annotated)
- Committer:
- mirzamesic
- Date:
- Mon Nov 18 18:24:12 2019 +0000
- Revision:
- 0:da5f57a822a5
5545
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mirzamesic | 0:da5f57a822a5 | 1 | #include "mbed.h" |
mirzamesic | 0:da5f57a822a5 | 2 | |
mirzamesic | 0:da5f57a822a5 | 3 | DigitalOut led(LED1); |
mirzamesic | 0:da5f57a822a5 | 4 | |
mirzamesic | 0:da5f57a822a5 | 5 | |
mirzamesic | 0:da5f57a822a5 | 6 | int main() { |
mirzamesic | 0:da5f57a822a5 | 7 | |
mirzamesic | 0:da5f57a822a5 | 8 | uint8_t variable = 0; |
mirzamesic | 0:da5f57a822a5 | 9 | |
mirzamesic | 0:da5f57a822a5 | 10 | led = !led; |
mirzamesic | 0:da5f57a822a5 | 11 | printf("Blink! LED is now %d\n", led.read()); |
mirzamesic | 0:da5f57a822a5 | 12 | scanf("%d", &variable); |
mirzamesic | 0:da5f57a822a5 | 13 | printf("Hello World und der wert der Variable: %d\n",variable); |
mirzamesic | 0:da5f57a822a5 | 14 | wait_ms(5); |
mirzamesic | 0:da5f57a822a5 | 15 | |
mirzamesic | 0:da5f57a822a5 | 16 | } |