Souleymane Touré
/
CodeSwitch
Code fonctionnel switch
Diff: main.cpp
- Revision:
- 0:3e61877b8e11
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Mar 07 12:29:56 2017 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" +DigitalIn din(D3); +DigitalOut led(LED1); +int main() { + while(1) { + if(din) { + led = 0;//Allume + } + else{ + led = 1;//Eteint + } + } +} \ No newline at end of file