Exo

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Quent1nl
Date:
Tue May 29 14:11:36 2018 +0000
Commit message:
EXG

Changed in this revision

Nboard.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3437b8d0cbdf Nboard.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Nboard.h	Tue May 29 14:11:36 2018 +0000
@@ -0,0 +1,5 @@
+#include "mbed.h"
+
+DigitalOut led0(PB_3), led1(PA_7),led2(PA_6),led3(PA_5);
+DigitalIn bp(PA_9, PullUp),bou1(PA_10,PullUp),bou2(PB_0,PullUp),bou3(PB_7,PullUp);
+BusOut Bus8Leds(PB_3,PA_7,PA_6,PA_5,PA_3,PA_1,PA_0,PA_2);
diff -r 000000000000 -r 3437b8d0cbdf main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 29 14:11:36 2018 +0000
@@ -0,0 +1,19 @@
+#include "Nboard.h"
+
+DigitalOut myled(LED1);
+
+int main()
+{
+    while(1) {
+        if (bp==0) {
+            Bus8Leds = 0xff;
+        } else if(bou1==0 && bou2==0) {
+            Bus8Leds =0x80;
+        } else if (bou1==0 && bou2==1) {
+            Bus8Leds = 0x02;
+        } else if (bou2==0 || bou3==0) {
+            Bus8Leds=0x0c;
+        } else
+            Bus8Leds = 0x00;
+    }
+}
diff -r 000000000000 -r 3437b8d0cbdf mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue May 29 14:11:36 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file