Code fonctionnel switch

Dependencies:   mbed

main.cpp

Committer:
Souleymane93
Date:
2017-03-07
Revision:
0:3e61877b8e11

File content as of revision 0:3e61877b8e11:

#include "mbed.h"
DigitalIn din(D3);
DigitalOut led(LED1);
int main() {
    while(1) {
        if(din) {
            led = 0;//Allume
        }
        else{
            led = 1;//Eteint    
        }
    }
}