NBoard / Mbed 2 deprecated NBoard_IO

Dependencies:   mbed

Fork of NBoard_IO by NBoard

Committer:
gr66
Date:
Mon Nov 07 20:35:15 2016 +0000
Revision:
1:af1bd60bfb56
Parent:
0:859bc4257c1c
v11

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gr66 0:859bc4257c1c 1 #include "mbed.h"
gr66 0:859bc4257c1c 2
gr66 0:859bc4257c1c 3 DigitalOut Led0(PB_3); // PB_3 port sur lequel est connecté la Led0
gr66 0:859bc4257c1c 4 BusOut MonBus(PA_7,PA_6); // creation bus
gr66 0:859bc4257c1c 5 DigitalIn BP0(PA_9,PullUp); //PA_9 port sur lequel est connecté le BP0
gr66 0:859bc4257c1c 6 //
gr66 0:859bc4257c1c 7 int main() {
gr66 0:859bc4257c1c 8 while(1) {
gr66 0:859bc4257c1c 9 Led0 = 1; // Led0 is ON
gr66 0:859bc4257c1c 10 wait(0.2); // 200 ms
gr66 0:859bc4257c1c 11 Led0 = 0; // Led0 is OFF
gr66 1:af1bd60bfb56 12 wait(0.2); // 200 ms
gr66 0:859bc4257c1c 13 if(!BP0) MonBus=1;
gr66 0:859bc4257c1c 14 else MonBus=2;
gr66 0:859bc4257c1c 15 }
gr66 0:859bc4257c1c 16 }