BTS SNEC 1, SELENA CLEMENCE / Mbed 2 deprecated 2-GPIO2

Dependencies:   mbed

main.cpp

Committer:
selena13
Date:
2020-09-08
Revision:
29:2146e1bb7b4a
Parent:
28:1a9ba65b41a4
Child:
30:0c89e3f9bf05

File content as of revision 29:2146e1bb7b4a:

#include "mbed.h"

 DigitalOut led_rouge (LED4);
 DigitalOut led_verte (LED2);
 DigitalIn BP2(PTC6);
 DigitalIn BP3 (PTA4);

int main() {
    while(1) {
        if (BP2==1)
        {
            led_rouge = 1;
            }
        else
            {
                led_rouge =0;
                }
        if (BP3==1)
        {
            led_verte = 1;
            }
        else
            {
                led_verte = 0;
                }
        
    }
}