Mikel Coronado Arana
/
P3_4
P3_4
main4.cpp
- Committer:
- mikel9547coronado
- Date:
- 2017-11-09
- Revision:
- 1:973f9f702056
- Parent:
- main.cpp@ 0:5e40d6a769f1
File content as of revision 1:973f9f702056:
#include "mbed.h" InterruptIn myswitch1(A5); InterruptIn myswitch2(A4); InterruptIn myswitch3(A2); DigitalOut myled1(D4); DigitalOut myled2(D3); DigitalOut myled3(D2); void boton1pulsado(){ myled1=!myled1; } void boton2pulsado(){ myled2=!myled2; } void boton3pulsado(){ myled3=!myled3; } int main() { myswitch1.rise(&boton1pulsado); myswitch2.rise(&boton2pulsado); myswitch3.rise(&boton3pulsado); while(1) { sleep(); } }