jeozadaque macedo
/
ETEPAM_JEOZADAQUE
código blink
main.cpp@0:c0f263609bd4, 2019-05-23 (annotated)
- Committer:
- Jeozadaque_macedo
- Date:
- Thu May 23 23:44:15 2019 +0000
- Revision:
- 0:c0f263609bd4
codigo blink, aula de microcontroladores
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jeozadaque_macedo | 0:c0f263609bd4 | 1 | #include "mbed.h" |
Jeozadaque_macedo | 0:c0f263609bd4 | 2 | |
Jeozadaque_macedo | 0:c0f263609bd4 | 3 | DigitalOut led1(LED1); |
Jeozadaque_macedo | 0:c0f263609bd4 | 4 | DigitalOut led2(LED2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 5 | DigitalOut led3(LED3); |
Jeozadaque_macedo | 0:c0f263609bd4 | 6 | DigitalOut led4(LED4); |
Jeozadaque_macedo | 0:c0f263609bd4 | 7 | int main() { |
Jeozadaque_macedo | 0:c0f263609bd4 | 8 | while(1) { |
Jeozadaque_macedo | 0:c0f263609bd4 | 9 | led1= 1; |
Jeozadaque_macedo | 0:c0f263609bd4 | 10 | wait(0.2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 11 | led1 = 0,led2= 1; |
Jeozadaque_macedo | 0:c0f263609bd4 | 12 | wait(0.2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 13 | led2= 0; |
Jeozadaque_macedo | 0:c0f263609bd4 | 14 | led3= 1; |
Jeozadaque_macedo | 0:c0f263609bd4 | 15 | wait(0.2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 16 | led3= 0; |
Jeozadaque_macedo | 0:c0f263609bd4 | 17 | led4= 1; |
Jeozadaque_macedo | 0:c0f263609bd4 | 18 | wait(0.2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 19 | led4=0; |
Jeozadaque_macedo | 0:c0f263609bd4 | 20 | wait(0.2); |
Jeozadaque_macedo | 0:c0f263609bd4 | 21 | } |
Jeozadaque_macedo | 0:c0f263609bd4 | 22 | } |