Marcos Lucas
/
blinksos
Programa para testes
main.cpp@1:8c81337d6d2e, 2015-03-03 (annotated)
- Committer:
- mlucas82
- Date:
- Tue Mar 03 06:15:36 2015 +0000
- Revision:
- 1:8c81337d6d2e
- Parent:
- 0:a6f65085b80e
- Child:
- 3:5aa59a6b4243
added function "pisca"
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mlucas82 | 0:a6f65085b80e | 1 | #include "mbed.h" |
mlucas82 | 0:a6f65085b80e | 2 | |
mlucas82 | 0:a6f65085b80e | 3 | DigitalOut myled(LED1); |
mlucas82 | 0:a6f65085b80e | 4 | |
mlucas82 | 1:8c81337d6d2e | 5 | void pisca() |
mlucas82 | 1:8c81337d6d2e | 6 | { |
mlucas82 | 1:8c81337d6d2e | 7 | myled = 1; |
mlucas82 | 1:8c81337d6d2e | 8 | wait(0.2); |
mlucas82 | 1:8c81337d6d2e | 9 | myled = 1; |
mlucas82 | 1:8c81337d6d2e | 10 | } |
mlucas82 | 1:8c81337d6d2e | 11 | |
mlucas82 | 0:a6f65085b80e | 12 | int main() { |
mlucas82 | 0:a6f65085b80e | 13 | while(1) { |
mlucas82 | 1:8c81337d6d2e | 14 | pisca(); |
mlucas82 | 0:a6f65085b80e | 15 | wait(0.2); |
mlucas82 | 0:a6f65085b80e | 16 | } |
mlucas82 | 0:a6f65085b80e | 17 | } |