NBoard / Mbed 2 deprecated NBoard_Serial

Dependencies:   mbed

Fork of NBoard_IO by NBoard

Revision:
0:859bc4257c1c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NBoard_IO.cpp	Mon Nov 07 11:13:20 2016 +0000
@@ -0,0 +1,16 @@
+#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.5);  // 1 sec
+        if(!BP0) MonBus=1;
+        else MonBus=2;
+    }
+}