programa matriz

Dependencies:   mbed

Fork of 00_LAB_matrix8x8_SPI by ferney alberto beltran molina

Revision:
4:569fbe5a6d13
Parent:
3:4a8de2f71ed0
--- a/main.cpp	Thu Mar 16 22:56:47 2017 +0000
+++ b/main.cpp	Sat Sep 01 22:06:10 2018 +0000
@@ -85,10 +85,43 @@
                 vcol2[j]=vt2[i];
             }
             printMatrix(vcol2);
-            wait_ms(5);
+            wait_ms(500);
         }
         }    
 }   
+
+void borrar()
+{
+    int i;
+    for(i=0;i<9;i++)
+    {
+     sendSPI(i,0);
+     
+     }
+    
+    
+    }
+
+
+void l()
+{
+sendSPI(5,0b00000001);
+sendSPI(4,0b00000111);
+wait(0.5);
+
+uint8_t a=0b00011100;
+uint8_t b=0b00000010;
+
+sendSPI(4,a);
+sendSPI(5,b);
+wait(1);
+a=a<<7;
+b=b<<7;
+sendSPI(4,a);
+sendSPI(5,b);
+wait(1);
+}
+
 int main() {
                     uint8_t vcol[8]={0,0,0,0,0,0,0,0};
                     sendSPI(0x0c,1);
@@ -97,8 +130,11 @@
                     sendSPI(0x0f,0);
                     wait (0.1);
                     int i =0;
+                    sendSPI(0xB,0x7);
+                    borrar();
                     while(1){
-                        print_Snake();
+                        //print_Snake();
+                        l();
                         }
 }
 // ***************************************************************************