First wall heart

Dependencies:   mbed

Revision:
0:d0d0c639618c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 11 00:43:37 2016 +0000
@@ -0,0 +1,79 @@
+#include "mbed.h"
+//columnas
+DigitalOut col1(PTA1);
+DigitalOut col2(PTA2);
+DigitalOut col3(PTD4);
+DigitalOut col4(PTA12);
+DigitalOut col5(PTA4);
+
+//filas
+DigitalOut floor1(PTA13);
+DigitalOut floor2(PTD5);
+DigitalOut floor3(PTD0);
+DigitalOut floor4(PTD2);
+DigitalOut floor5(PTD3);
+
+int main() {
+    while(1) {
+        
+        col1 = 1;
+        floor3 = 1;
+        floor4 = 1;
+        wait(0.002);
+        col1 = 0;
+        floor3 = 0;
+        floor4 = 0;
+        wait(0.002);
+        
+        col2 = 1;
+        floor2 = 1;
+        floor3 = 1;
+        floor4 = 1;
+        floor5 = 1;
+        wait(0.002);
+        col2 = 0;
+        floor2 = 0;
+        floor3 = 0;
+        floor4 = 0;
+        floor5 = 0;
+        wait(0.002);
+        
+        
+        col3 = 1;
+        floor1 = 1;
+        floor2 = 1;
+        floor3 = 1;
+        floor4 = 1;
+        wait(0.002);
+        col3 = 0;
+        floor1 = 0;
+        floor2 = 0;
+        floor3 = 0;
+        floor4 = 0;
+        wait(0.002);
+        
+        
+        col4 = 1;
+        floor2 = 1;
+        floor3 = 1;
+        floor4 = 1;
+        floor5 = 1;
+        wait(0.002);
+        col4 = 0;
+        floor2 = 0;
+        floor3 = 0;
+        floor4 = 0;
+        floor5 = 0;
+        wait(0.002);
+        
+        
+        col5 = 1;
+        floor3 = 1;
+        floor4 = 1;
+        wait(0.002);
+        col5 = 0;
+        floor3 = 0;
+        floor4 = 0;
+        wait(0.002);
+    }
+}