Luuk Blaauw
/
frdm_gpio
lampjes knipperen
main.cpp@0:38a7e8798919, 2016-09-12 (annotated)
- Committer:
- luukblaauw
- Date:
- Mon Sep 12 09:59:48 2016 +0000
- Revision:
- 0:38a7e8798919
lololololololololol
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
luukblaauw | 0:38a7e8798919 | 1 | #include "mbed.h" |
luukblaauw | 0:38a7e8798919 | 2 | |
luukblaauw | 0:38a7e8798919 | 3 | DigitalOut led1(LED_BLUE); |
luukblaauw | 0:38a7e8798919 | 4 | DigitalOut led2(LED_GREEN); |
luukblaauw | 0:38a7e8798919 | 5 | DigitalOut led(LED_RED); |
luukblaauw | 0:38a7e8798919 | 6 | |
luukblaauw | 0:38a7e8798919 | 7 | int main() |
luukblaauw | 0:38a7e8798919 | 8 | { |
luukblaauw | 0:38a7e8798919 | 9 | while (true) { |
luukblaauw | 0:38a7e8798919 | 10 | led = !led; // toggle led |
luukblaauw | 0:38a7e8798919 | 11 | led1 = !led; |
luukblaauw | 0:38a7e8798919 | 12 | led2 = !led1; |
luukblaauw | 0:38a7e8798919 | 13 | wait(0.2f); |
luukblaauw | 0:38a7e8798919 | 14 | } |
luukblaauw | 0:38a7e8798919 | 15 | } |