team majorel / Mbed 2 deprecated 2_GPIO_led_blanche

Dependencies:   mbed

main.cpp

Committer:
xavier_majorel
Date:
2020-09-09
Revision:
33:710cfcf55052
Parent:
32:4d02d78d0c44

File content as of revision 33:710cfcf55052:

#include "mbed.h"

DigitalOut Led_blanche(D2);

DigitalIn BP2(D3);

int main() {
    while(1) {
        if (BP2==1) 
        {
            Led_blanche=1; 
        }
        else 
        {
            Led_blanche=0; 
        }
        
    } // fin de boucle infinie 
}     // fin programme