Dependencies:   mbed

Fork of NBoard_IO by NBoard

NBoard_IO.cpp

Committer:
gr66
Date:
2016-11-07
Revision:
1:af1bd60bfb56
Parent:
0:859bc4257c1c

File content as of revision 1:af1bd60bfb56:

#include "mbed.h"

DigitalOut Led0(PB_3);      // PB_3 port sur lequel est connecté la Led0
BusOut MonBus(PA_7,PA_6);   // creation bus 
DigitalIn BP0(PA_9,PullUp); //PA_9 port sur lequel est connecté le BP0
//
int main() {
    while(1) {
        Led0 = 1;   // Led0 is ON
        wait(0.2);  // 200 ms
        Led0 = 0;   // Led0 is OFF
        wait(0.2);  // 200 ms
        if(!BP0) MonBus=1;
        else MonBus=2;
    }
}