test1

Dependencies:   mbed

Revision:
0:63cb70b5e1f8
--- /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);
+        */
+    }
+}