First wall heart

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
griszAndy
Date:
Mon Apr 11 00:43:37 2016 +0000
Commit message:
First Revision Heart on one wall.

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
--- /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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 11 00:43:37 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file