Práctica 2 Ejercicio 1
Dependencies: mbed
main.cpp@0:48598a2de8bb, 2017-11-03 (annotated)
- Committer:
- anderibabe
- Date:
- Fri Nov 03 14:21:19 2017 +0000
- Revision:
- 0:48598a2de8bb
Pr?ctica 2 Ejercicio 1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
anderibabe | 0:48598a2de8bb | 1 | #include "mbed.h" |
anderibabe | 0:48598a2de8bb | 2 | |
anderibabe | 0:48598a2de8bb | 3 | DigitalIn Sw1(PB_0); // Switch1 conectado al pin A3 |
anderibabe | 0:48598a2de8bb | 4 | DigitalIn Sw2(PC_1); // Switch2 conectado al pin A4 |
anderibabe | 0:48598a2de8bb | 5 | DigitalIn Sw3(PC_0); // Switch3 conectado al pin A5 |
anderibabe | 0:48598a2de8bb | 6 | DigitalOut Led1(PB_3); // Led1 conectado al pin D3 |
anderibabe | 0:48598a2de8bb | 7 | DigitalOut Led2(PB_5); // Led2 conectado al pin D4 |
anderibabe | 0:48598a2de8bb | 8 | DigitalOut Led3(PB_4); // Led3 conectado al pin D5 |
anderibabe | 0:48598a2de8bb | 9 | |
anderibabe | 0:48598a2de8bb | 10 | int main() |
anderibabe | 0:48598a2de8bb | 11 | { |
anderibabe | 0:48598a2de8bb | 12 | Led1 = !Sw1; |
anderibabe | 0:48598a2de8bb | 13 | Led2 = !Sw2; |
anderibabe | 0:48598a2de8bb | 14 | Led3 = !Sw3; |
anderibabe | 0:48598a2de8bb | 15 | |
anderibabe | 0:48598a2de8bb | 16 | } |