Nikita Ivanykov
/
laba4
9
main.cpp@0:b4a010422ed1, 2019-11-13 (annotated)
- Committer:
- troshha
- Date:
- Wed Nov 13 10:29:33 2019 +0000
- Revision:
- 0:b4a010422ed1
9
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
troshha | 0:b4a010422ed1 | 1 | #include "mbed.h" |
troshha | 0:b4a010422ed1 | 2 | |
troshha | 0:b4a010422ed1 | 3 | DigitalOut myled(LED1); |
troshha | 0:b4a010422ed1 | 4 | |
troshha | 0:b4a010422ed1 | 5 | int main() { |
troshha | 0:b4a010422ed1 | 6 | while(1) { |
troshha | 0:b4a010422ed1 | 7 | myled = 1; // LED is ON |
troshha | 0:b4a010422ed1 | 8 | wait(0.2); // 200 ms |
troshha | 0:b4a010422ed1 | 9 | myled = 0; // LED is OFF |
troshha | 0:b4a010422ed1 | 10 | wait(1.0); // 1 sec |
troshha | 0:b4a010422ed1 | 11 | } |
troshha | 0:b4a010422ed1 | 12 | } |