test1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
henkbaams
Date:
Sat Dec 08 21:22:17 2018 +0000
Commit message:
test1

Changed in this revision

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 63cb70b5e1f8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Dec 08 21:22:17 2018 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+
+// https://lancaster-university.github.io/microbit-docs/ubit/display/
+/* 
+ * All the LEDs on the micro:bit are part of the LED Matrix,
+ * In order to get simple blinking behaviour, we set column 0
+ * to be permanently at ground. If you want to use the LEDs as
+ * a screen, there is a display driver in the micro:bit 'DAL',
+ */
+DigitalOut col0(P0_4, 0);
+
+
+DigitalOut myled1(P0_14);   //4,2
+DigitalOut myled2(P0_13);   //0,0
+DigitalOut myled3(P0_15);   //2,4
+DigitalOut myled4(P0_18);   //2,4
+
+
+
+
+//DigitalOut myled(P0_13); //0,0
+//DigitalOut myled(P0_13); //0,0
+//DigitalOut myled(P0_13); //0,0
+
+
+
+
+
+
+int main() {
+    while(1) {
+        
+        myled1 = 1;
+        wait_us(1000000);
+        myled1 = 0;
+        wait_us(1000000);
+        /*
+        myled2 = 1;
+        wait_us(1000000);
+        myled2 = 0;
+        wait_us(1000000);
+        
+        
+        myled4 = 1;
+        wait_us(1000000);
+        myled4 = 0;
+        wait_us(1000000);
+        */
+    }
+}
diff -r 000000000000 -r 63cb70b5e1f8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Dec 08 21:22:17 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb
\ No newline at end of file