Librería Diego; Programacion para Sistemas Embebidos
Diego.h@1:03c2a6a697d9, 2016-02-17 (annotated)
- Committer:
- DiegoRivera
- Date:
- Wed Feb 17 02:09:08 2016 +0000
- Revision:
- 1:03c2a6a697d9
- Parent:
- 0:f369b857dbf9
- Child:
- 2:9c1faaf8ccb3
Leds
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DiegoRivera | 0:f369b857dbf9 | 1 | #ifndef Diego_h |
DiegoRivera | 0:f369b857dbf9 | 2 | #define Diego_h |
DiegoRivera | 0:f369b857dbf9 | 3 | |
DiegoRivera | 0:f369b857dbf9 | 4 | #include "mbed.h" |
DiegoRivera | 0:f369b857dbf9 | 5 | |
DiegoRivera | 0:f369b857dbf9 | 6 | DigitalOut led1(LED1); |
DiegoRivera | 0:f369b857dbf9 | 7 | DigitalOut led2(LED2); |
DiegoRivera | 0:f369b857dbf9 | 8 | DigitalOut led3(LED3); |
DiegoRivera | 0:f369b857dbf9 | 9 | |
DiegoRivera | 0:f369b857dbf9 | 10 | void Diego_Mensaje() |
DiegoRivera | 0:f369b857dbf9 | 11 | { |
DiegoRivera | 0:f369b857dbf9 | 12 | pc.printf("Diego Rivera \n"); |
DiegoRivera | 0:f369b857dbf9 | 13 | } |
DiegoRivera | 0:f369b857dbf9 | 14 | |
DiegoRivera | 0:f369b857dbf9 | 15 | void Diego_led() |
DiegoRivera | 0:f369b857dbf9 | 16 | { |
DiegoRivera | 0:f369b857dbf9 | 17 | led1=0; |
DiegoRivera | 0:f369b857dbf9 | 18 | led2=0; |
DiegoRivera | 0:f369b857dbf9 | 19 | led3=0; |
DiegoRivera | 1:03c2a6a697d9 | 20 | wait(0.5); |
DiegoRivera | 0:f369b857dbf9 | 21 | |
DiegoRivera | 0:f369b857dbf9 | 22 | led1=1; |
DiegoRivera | 0:f369b857dbf9 | 23 | led2=1; |
DiegoRivera | 0:f369b857dbf9 | 24 | led3=1; |
DiegoRivera | 1:03c2a6a697d9 | 25 | wait(0.5) |
DiegoRivera | 0:f369b857dbf9 | 26 | } |
DiegoRivera | 0:f369b857dbf9 | 27 | |
DiegoRivera | 0:f369b857dbf9 | 28 | #endif |
DiegoRivera | 0:f369b857dbf9 | 29 |